请访问原文链接:sysin.org/blog/disabl…,查看最新版。转载请保留出处。
作者主页:sysin.org
如何禁用 Mozilla FireFox 自动更新 如何禁用 Microsoft Edge 自动更新 如何禁用 Google Chrome 自动更新
未经用户允许自动更新,也不提供选项禁用自动更新,属实不文明不举,以下方法可以禁用自动更新。
Google Chrome for Windows
Google Chrome 如何自动更新?
当前以 Chrome 88.0 版本为例,新版本将来可能有所变更:
企业版使用以下方法进行自动更新
更新服务:
Google 更新服务 (gupdate)
Google 更新服务 (gupdatem)
Google Chrome Elevation Service (GoogleChromeElevationService)
任务计划:
GoogleUpdateTaskMachineCore
GoogleUpdateTaskMachineUA
安装路径:
x64
C:\Program Files\Google\Chrome\Application\chrome.exe
x86
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
GoogleUpdate.exe 路径:
x64 和 x86 版本相同
C:\Program Files (x86)\Google\Update\GoogleUpdate.exe
用户版不带自动更新程序
用户版安装路径:
C:\Users\用户名\AppData\Local\Google\Chrome\Application\chrome.exe
使用 PowerShell 禁用更新
if ([Environment]::Is64BitOperatingSystem -eq “True”) {
#Write-Host "64-bit OS"
$PF=${env:ProgramFiles(x86)}
}
else {
#Write-Host "32-bit OS"
$PF=$env:ProgramFiles
}
if ($(Test-Path "$env:ProgramFiles\Google\Chrome\Application\chrome.exe") -eq "true") {
# 结束进程
taskkill /im chrome.exe /f
taskkill /im GoogleUpdate.exe /f
# Google Chrome 更新服务
#这里也可以使用 sc.exe stop "service name"
Stop-Service -Name "gupdate"
Stop-Service -Name "gupdatem"
Stop-Service -Name "GoogleChromeElevationService"
# Windows 10 默认 PS 版本 5.1 没有 Remove-Service 命令
# This cmdlet was added in PS v6. See https://docs.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-core-60?view=powershell-6#cmdlet-updates.
#Remove-Service -Name "gupdate"
#Remove-Service -Name "gupdatem"
#Remove-Service -Name "GoogleChromeElevationService"
# sc 在 PowerShell 中是 Set-Content 别名,所以要使用 sc.exe 否则执行后无任何效果
sc.exe delete "gupdate"
sc.exe delete "gupdatem"
sc.exe delete "GoogleChromeElevationService"
# 任务计划企业版
schtasks.exe /Delete /TN \GoogleUpdateBrowserReplacementTask /F
schtasks.exe /Delete /TN \GoogleUpdateTaskMachineCore /F
schtasks.exe /Delete /TN \GoogleUpdateTaskMachineUA /F
# 移除更新程序
Remove-Item "$PF\Google\Update\" -Recurse -Force
echo "Disable Google Chrome Enterprise x64 Auto Update Successful!"
}
elseif ($(Test-Path "${env:ProgramFiles(x86)}\Google\Chrome\Application\chrome.exe") -eq "true") {
# 结束进程
taskkill /im chrome.exe /f
taskkill /im GoogleUpdate.exe /f
# Google Chrome 更新服务
#这里也可以使用 sc.exe stop "service name"
Stop-Service -Name "gupdate"
Stop-Service -Name "gupdatem"
Stop-Service -Name "GoogleChromeElevationService"
# Windows 10 默认 PS 版本 5.1 没有 Remove-Service 命令
# This cmdlet was added in PS v6. See https://docs.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-core-60?view=powershell-6#cmdlet-updates.
#Remove-Service -Name "gupdate"
#Remove-Service -Name "gupdatem"
#Remove-Service -Name "GoogleChromeElevationService"
# sc 在 PowerShell 中是 Set-Content 别名,所以要使用 sc.exe 否则执行后无任何效果
sc.exe delete "gupdate"
sc.exe delete "gupdatem"
sc.exe delete "GoogleChromeElevationService"
# 任务计划企业版
schtasks.exe /Delete /TN \GoogleUpdateBrowserReplacementTask /F
schtasks.exe /Delete /TN \GoogleUpdateTaskMachineCore /F
schtasks.exe /Delete /TN \GoogleUpdateTaskMachineUA /F
# 移除更新程序
Remove-Item "$PF\Google\Update\" -Recurse -Force
echo "Disable Google Chrome Enterprise x86 Auto Update Successful!"
}
else {
echo "No Google Chrome Enterprise Installation Detected!"
}
效果图:
Google Chrome for Mac
Google Chrome 如何自动更新?
通过以下进程:
~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/GoogleSoftwareUpdateAgent.app
~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/GoogleSoftwareUpdateAgent.app via ~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/ksfetch
/Applications/Google Chrome.app via ~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/ksfetch
~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/ksfetch
访问 Google 相关域名检测并下载更新。
tools.google.com #主要
update.googleapis.com #某些版本适用
解决方案:
- 屏蔽进程网络访问
- 删除进程并禁止重新生成
- hosts 屏蔽相关域名
禁用自动更新一般步骤
1.删除和设置权限
打开终端执行如下命令:
cd ~/Library/Google/GoogleSoftwareUpdate
rm -rf GoogleSoftwareUpdate.bundle
cd ~/Library/Google
sudo chown root:wheel GoogleSoftwareUpdate
2.编辑 hosts 文件,添加如下内容:
手动编辑,打开终端,执行:sudo vi /etc/hosts
,或者使用 SwitchHosts!(免费软件)
127.0.0.1 update.googleapis.com
127.0.0.1 tools.google.com
以上两步任意一个已经可以屏蔽自动更新,同时操作更加保险。
3.或者(或同时)使用防火墙软件屏蔽:
推荐 Little Snitch,这是一个商业软件
分别新建规则,屏蔽以下进程访问网络:
~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/GoogleSoftwareUpdateAgent.app
~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/GoogleSoftwareUpdateAgent.app via ~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/ksfetch
/Applications/Google Chrome.app via ~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/ksfetch
~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/ksfetch
Process Name:上述进程名
Deny Outgoing Connections
To: Any Server
效果图:
资源
Google Chrome 下载
备注:Chrome 内置多国语言界面。
macOS 最新稳定版固定下载地址
Chrome for macOS with Intel chip
Chrome for macOS with Apple chip
Linux 最新稳定版固定下载地址
Windows System Setup 最新稳定版固定下载地址
(安装在 Program Files 文件夹下,需要管理员权限安装)
Google Chrome System Setup x86 - 32bit
Google Chrome System Setup x64 - 64bit
Windows User Setup (安装在 Users 文件夹下)
查看最新版:tools.shuax.com/chrome/
Windows 版固定下载地址(需要文明访问)
If you want to install Google Chrome for single user account:
Download Google Chrome Offline Installer (32-bit)
Download Google Chrome Offline Installer (64-bit)
If you want to install Google Chrome for all user accounts:
Google Chrome Offline Installer for All User Accounts (32-bit)
Google Chrome Offline Installer for All User Accounts (64-bit)
Download Full Offline Windows Installer (MSI) of Google Chrome:
Download Google Chrome MSI Installer for Windows
Download Google Chrome MSI Installer for Windows (Alternative Link)