Created
April 6, 2018 12:28
-
-
Save frayos/c4ae8cef7d7b4b74c8838e7ba23990c9 to your computer and use it in GitHub Desktop.
UpdateOfficeForce
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
| @echo on | |
| setlocal | |
| reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration\ /v CDNBaseUrl | |
| if %errorlevel%==0 (goto SwitchChannel) else (goto End) | |
| :SwitchChannel | |
| reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v CDNBaseUrl /t REG_SZ /d "http://officecdn.microsoft.com/pr/492350f6-3a01-4f97-b9c0-c7c6ddf67d60" /f | |
| reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v UpdateUrl /f | |
| reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v UpdateToVersion /f | |
| reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Updates /v UpdateToVersion /f | |
| reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Office\16.0\Common\OfficeUpdate\ /f | |
| "%CommonProgramFiles%\microsoft shared\ClickToRun\OfficeC2RClient.exe" /update user | |
| :End | |
| Endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment