backup: save local changes on 2025-09-26
This commit is contained in:
73
lock_chrome_version.bat
Normal file
73
lock_chrome_version.bat
Normal file
@@ -0,0 +1,73 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo ==========================================
|
||||
echo Chrome Version Lock Tool
|
||||
echo ==========================================
|
||||
echo.
|
||||
echo This will lock Chrome version to prevent auto-updates
|
||||
echo.
|
||||
|
||||
REM 1. Stop Chrome processes
|
||||
echo Stopping Chrome processes...
|
||||
taskkill /f /im chrome.exe >nul 2>&1
|
||||
timeout /t 2 /nobreak >nul
|
||||
|
||||
REM 2. Stop Google Update services
|
||||
echo Stopping Google Update services...
|
||||
sc stop gupdate >nul 2>&1
|
||||
sc stop gupdatem >nul 2>&1
|
||||
sc stop GoogleChromeElevationService >nul 2>&1
|
||||
|
||||
REM 3. Disable Google Update services
|
||||
echo Disabling Google Update services...
|
||||
sc config gupdate start= disabled >nul 2>&1
|
||||
sc config gupdatem start= disabled >nul 2>&1
|
||||
|
||||
REM 4. Delete scheduled tasks
|
||||
echo Removing update scheduled tasks...
|
||||
schtasks /delete /tn "GoogleUpdateTaskMachineCore" /f >nul 2>&1
|
||||
schtasks /delete /tn "GoogleUpdateTaskMachineUA" /f >nul 2>&1
|
||||
|
||||
REM 5. Registry settings to disable updates
|
||||
echo Configuring registry to disable updates...
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update" /v "AutoUpdateCheckPeriodMinutes" /t REG_DWORD /d 0 /f >nul 2>&1
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update" /v "UpdateDefault" /t REG_DWORD /d 0 /f >nul 2>&1
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update" /v "DisableAutoUpdateChecksCheckboxValue" /t REG_DWORD /d 1 /f >nul 2>&1
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update" /v "Update{8A69D345-D564-463C-AFF1-A69D9E530F96}" /t REG_DWORD /d 0 /f >nul 2>&1
|
||||
|
||||
REM 6. User-level registry settings
|
||||
reg add "HKEY_CURRENT_USER\SOFTWARE\Policies\Google\Update" /v "AutoUpdateCheckPeriodMinutes" /t REG_DWORD /d 0 /f >nul 2>&1
|
||||
reg add "HKEY_CURRENT_USER\SOFTWARE\Policies\Google\Update" /v "UpdateDefault" /t REG_DWORD /d 0 /f >nul 2>&1
|
||||
|
||||
REM 7. Rename Google Update executable (backup method)
|
||||
echo Disabling Google Update executable...
|
||||
if exist "C:\Program Files\Google\Update\GoogleUpdate.exe" (
|
||||
ren "C:\Program Files\Google\Update\GoogleUpdate.exe" "GoogleUpdate.exe.disabled" >nul 2>&1
|
||||
)
|
||||
if exist "C:\Program Files (x86)\Google\Update\GoogleUpdate.exe" (
|
||||
ren "C:\Program Files (x86)\Google\Update\GoogleUpdate.exe" "GoogleUpdate.exe.disabled" >nul 2>&1
|
||||
)
|
||||
|
||||
REM 8. Block update URLs in hosts file (optional but effective)
|
||||
echo Blocking update URLs...
|
||||
echo. >> C:\Windows\System32\drivers\etc\hosts
|
||||
echo # Block Google Chrome Updates >> C:\Windows\System32\drivers\etc\hosts
|
||||
echo 127.0.0.1 update.googleapis.com >> C:\Windows\System32\drivers\etc\hosts
|
||||
echo 127.0.0.1 clients2.google.com >> C:\Windows\System32\drivers\etc\hosts
|
||||
echo 127.0.0.1 clients4.google.com >> C:\Windows\System32\drivers\etc\hosts
|
||||
|
||||
echo.
|
||||
echo ==========================================
|
||||
echo Chrome version has been locked!
|
||||
echo.
|
||||
echo What was done:
|
||||
echo - Stopped Google Update services
|
||||
echo - Disabled automatic updates via registry
|
||||
echo - Removed update scheduled tasks
|
||||
echo - Disabled GoogleUpdate.exe
|
||||
echo - Blocked update URLs
|
||||
echo.
|
||||
echo Chrome will no longer auto-update!
|
||||
echo ==========================================
|
||||
echo.
|
||||
pause
|
||||
Reference in New Issue
Block a user