Created
July 27, 2022 07:43
-
-
Save ryzhovau/db7c5d56b04c8bdc424cea18b5359f9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creds goes to https://github.com/farag2/Office | |
# It is needed to remove these keys not to bypass Russian and Belarusian region blocks | |
Remove-Item -Path HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\Experiment -Recurse -Force -ErrorAction Ignore | |
Remove-Item -Path HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\ExperimentConfigs -Recurse -Force -ErrorAction Ignore | |
Remove-Item -Path HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\ExperimentEcs -Recurse -Force -ErrorAction Ignore | |
# Set location to Ukraine | |
Set-WinHomeLocation -GeoId 241 | |
# Download installer | |
$Installer = 'OfficeSetup.exe' | |
$URL = 'https://c2rsetup.officeapps.live.com/c2r/download.aspx?productReleaseID=O365ProPlusRetail&platform=Def&language=ru-ru&TaxRegion=pr&correlationId=382437ff-19d3-480b-a3f0-7cc88fc07cc4&token=06623e14-ba99-4d97-9899-a5777f83ea15&version=O16GA&source=O15OLSO365&Br=2&TenantId=882d47f6-50f4-4554-9aa6-43a46416b0f0' | |
if (-not (Test-Path -Path $Installer)) { | |
try { | |
Invoke-WebRequest $URL -OutFile $Installer -ErrorAction Stop | |
} catch { | |
Write-Host "Сперва скачайте $Installer на https://www.office.com/?auth=2&home=1" | |
exit | |
} | |
} | |
# Start installation | |
Start-Process -FilePath $Installer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment