Chrome for Windows 如何自动更新?
当前以 Chrome 88.0 版本为例,新版本将来可能有所变更:
Chrome 在 Windows 平台同时发布两个版本,分别是:
企业版即 Windows System Setup,安装在
Program Files
文件夹下,需要管理员权限安装;用户版即 Windows User Setup,安装在
Users
文件夹下,不需要管理员权限,普通用户就可以安装。
企业版使用以下方法进行自动更新
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 更新服务: 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 |
根据上述路径,手动禁用或者删除即可禁用自动更新。
用户版不带自动更新程序
1 2 | 用户版安装路径: C:\Users\用户名\AppData\Local\Google\Chrome\Application\chrome.exe |
使用 PowerShell 禁用更新
打开 PowerShell 直接复制以下脚本运行一下更加方便:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | 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 Write-Output "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 Write-Output "Disable Google Chrome Enterprise x86 Auto Update Successful!" } else { Write-Output "No Google Chrome Enterprise Installation Detected!" } |
Microsoft Edge for Windows
Microsoft Edge 如何自动更新?
当前以 Edge 88.0 版本为例,新版本将来可能有所变更:
Edge 在 Windows 平台同时发布两个版本,分别是:
企业版即 Windows System Setup,安装在
Program Files
文件夹下,需要管理员权限安装;用户版即 Windows User Setup,安装在
Users
文件夹下,不需要管理员权限,普通用户就可以安装。
企业版使用以下方法进行自动更新
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 服务: Microsoft Edge 更新 服务 (edgeupdate) Microsoft Edge 更新 服务 (edgeupdatem) Microsoft Edge Elevation Service (MicrosoftEdgeElevationService) 任务计划: MicrosoftEdgeUpdateBrowserReplacementTask MicrosoftEdgeUpdateTaskMachineCore MicrosoftEdgeUpdateTaskMachineUA 安装路径: C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe 更新程序路径: C:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe |
巨硬阿三不讲究,无论 64-bit 还是 32-bit 的 Edge 都安装在 “Program Files (x86”) 目录下面(Chrome 没有这个问题)。
用户版使用以下方法自动更新
1 2 3 4 5 6 7 8 9 10 11 | 任务计划: MicrosoftEdgeUpdateTaskUser当前用户的SIDCore MicrosoftEdgeUpdateTaskUser当前用户的SIDUA 例如: MicrosoftEdgeUpdateTaskUserS-1-5-21-3860493963-3742860931-3732056798-500Core MicrosoftEdgeUpdateTaskUserS-1-5-21-3860493963-3742860931-3732056798-500UA 用户版安装路径: C:\Users\用户名\AppData\Local\Microsoft\Edge\Application\msedge.exe 自动更新程序路径: C:\Users\用户名\AppData\Local\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe |
根据上述路径,手动禁用或者删除即可禁用自动更新。
使用 PowerShell 禁用更新:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | 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 "$PF\Microsoft\Edge\Application\msedge.exe") -eq "True") { # 结束进程 taskkill /im MicrosoftEdgeUpdate.exe /f taskkill /im msedge.exe /f # Microsoft Edge 更新服务 #这里也可以使用 sc.exe stop "service name" Stop-Service -Name "edgeupdate" Stop-Service -Name "edgeupdatem" Stop-Service -Name "MicrosoftEdgeElevationService" # 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 "edgeupdate" #Remove-Service -Name "edgeupdatem" #Remove-Service -Name "MicrosoftEdgeElevationService" # sc 在 PowerShell 中是 Set-Content 别名,所以要使用 sc.exe 否则执行后无任何效果 sc.exe delete "edgeupdate" sc.exe delete "edgeupdatem" sc.exe delete "MicrosoftEdgeElevationService" # 任务计划企业版 schtasks.exe /Delete /TN \MicrosoftEdgeUpdateBrowserReplacementTask /F schtasks.exe /Delete /TN \MicrosoftEdgeUpdateTaskMachineCore /F schtasks.exe /Delete /TN \MicrosoftEdgeUpdateTaskMachineUA /F # 移除更新程序 Remove-Item "$PF\Microsoft\EdgeUpdate" -Recurse -Force Write-Output "Disable Microsoft Edge Enterprise Auto Update Successful!" } elseif ($(Test-Path "$env:USERPROFILE\AppData\Local\Microsoft\Edge\Application\msedge.exe") -eq "True") { # 结束进程 taskkill /im MicrosoftEdgeUpdate.exe /f taskkill /im msedge.exe /f # 用户版没有创建服务 # 获取SID方法 function Get-CurrentUserSID { [CmdletBinding()] param( ) Add-Type -AssemblyName System.DirectoryServices.AccountManagement return ([System.DirectoryServices.AccountManagement.UserPrincipal]::Current).SID.Value } # 用户版任务计划 schtasks.exe /Delete /TN \MicrosoftEdgeUpdateTaskUser$(Get-CurrentUserSID)Core /F schtasks.exe /Delete /TN \MicrosoftEdgeUpdateTaskUser$(Get-CurrentUserSID)UA /F # 移除更新程序 Remove-Item "$env:USERPROFILE\AppData\Local\Microsoft\EdgeUpdate" -Recurse -Force Write-Output "Disable Microsoft Edge Users Setup Auto Update Successful!" } else { Write-Output "No Microsoft Edge Installation Detected!" } |
Firefox for Windows
方法一:使用策略文件
官方策略模板:https://github.com/mozilla/policy-templates/releases
创建策略文件:<Firefox 安装目录>\distribution\policies.json
内容如下,
1 2 3 4 5 | { "policies": { "DisableAppUpdate.": false } } |
方法二:使用注册表
操作步骤:
-
浏览到 “HKEY_LOCAL_MACHINE\Software\Policies” 创建项 “Mozilla” 在创建项 “Firefox” 创建完毕即 “HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox”
-
在上述路径,右键点击空白处,新建一个 DWORD (32-Bit) Value,名称为 “DisableAppUpdate”
-
双击创建的 “DisableAppUpdate”,将值修改为 “1”。
直接使用注册表文件:
1 2 3 4 | Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox] "DisableAppUpdate"=dword:00000001 |
直接使用 CMD(推荐,最便捷):
1 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox" /v DisableAppUpdate /t REG_DWORD /d 1 /f |