Created
May 19, 2015 21:06
-
-
Save absynce/7667bd32e632e72f406f to your computer and use it in GitHub Desktop.
Enable or disable Chrome updates in Windows via the registry - replaces https://gist.github.com/absynce/c35b93e27ababbeb9063
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
# ******************************************* | |
# | |
# Mod by: Jared M. Smith | |
# Mod on: 2015.04.xx | |
# Mod y?: Enable or disable Google Chrome updates. | |
# | |
# ******************************************* | |
# Log method | |
if (! (test-path function:Log)) { function Log { Param([string]$message) Write-Host $message; } } | |
function SetChromeUpdates | |
{ | |
Param( | |
[Parameter(Position=0, Mandatory=1)] | |
[boolean]$allowChromeUpdates=$true | |
) | |
$updateText = "Enabling" | |
# Enable/disable Chrome updates integer value | |
$allowChromeUpdatesValue = [int]$allowChromeUpdates | |
$notAllowChromeUpdatesValue = [int]!$allowChromeUpdates #inverted value | |
if (!$allowChromeUpdates) { | |
$updateText = "Disabling" | |
} | |
Log "$updateText Google Chrome updates." | |
New-Item -Path HKLM:\SOFTWARE\Policies\Google -name Update -value $allowChromeUpdatesValue -Force | |
New-Item -Path HKLM:\SOFTWARE\Wow6432Node\Policies\Google -name Update -value $allowChromeUpdatesValue -Force | |
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Google\Update -type dword -name AutoUpdateCheckPeriodMinutes -value $allowChromeUpdatesValue -Force | |
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Google\Update -type dword -name DisableAutoUpdateChecksCheckboxValue -value $notAllowChromeUpdatesValue -Force | |
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Google\Update -type dword -name "Update{8A69D345-D564-463C-AFF1-A69D9E530F96}" -value $allowChromeUpdatesValue -Force | |
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Google\Update -type dword -name UpdateDefault -value $allowChromeUpdatesValue -Force | |
New-ItemProperty -Path HKLM:\SOFTWARE\Wow6432Node\Policies\Google\Update -type dword -name AutoUpdateCheckPeriodMinutes -value $allowChromeUpdatesValue -Force | |
New-ItemProperty -Path HKLM:\SOFTWARE\Wow6432Node\Policies\Google\Update -type dword -name DisableAutoUpdateChecksCheckboxValue -value $notAllowChromeUpdatesValue -Force | |
New-ItemProperty -Path HKLM:\SOFTWARE\Wow6432Node\Policies\Google\Update -type dword -name "Update{8A69D345-D564-463C-AFF1-A69D9E530F96}" -value $allowChromeUpdatesValue -Force | |
New-ItemProperty -Path HKLM:\SOFTWARE\Wow6432Node\Policies\Google\Update -type dword -name UpdateDefault -value $allowChromeUpdatesValue -Force | |
Log "Added registry keys for $updateText Google updates." | |
if ($allowChromeUpdates) { | |
Start-Service gupdate | |
Start-Service gupdatem | |
Log "Attempted to start Google update services(s)." | |
} | |
else { | |
Stop-Service gupdate | |
Stop-Service gupdatem | |
Log "Stopped Google update services(s)." | |
} | |
} | |
where do i put it and how do i install it?
AWESOME scirpt by the way, love it, havent tried it out, but i hope to get reply soon, even nearly 3 years later i still hope this works :D
A suggestion:
AutoUpdateCheckPeriodMinutes
is being set to 1 when enabling. That causes Updater to check for updates every minute. It may be better to include a larger number there. Google's default is 1400, which works out to 23 hours 20 minutes.
Otherwise:
Great script!
Thanks @SysipheaN! Good point. I don't use this anymore, but I hope it helps other folks who might find this.
this is not working anymore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The value 8A69D345-D564-463C-AFF1-A69D9E530F96 should not be hard coded in the script. It may change from update to update.
Check the directory
C:\Program Files (x86)\Google\Update\Download
for finding the appropriate values to look for in registry.I assume Chrome is installed in
C:\Program Files (x86)\Google\