免互動安裝Google Chrome、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Google.Chrome -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Google.Chrome -e --silentwinget uninstall --id Google.Chrome -e --silent依安裝檔
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i googlechromestandaloneenterprise64.msi /qn /norestart寫入記錄檔
msiexec /i googlechromestandaloneenterprise64.msi /qn /norestart /l*v "%TEMP%\google-chrome-install.log"解除安裝
msiexec /x {807524DE-67B8-3922-BB35-773E5AFB6EBB} /qn /norestart- MSI產品代碼
- {807524DE-67B8-3922-BB35-773E5AFB6EBB}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{807524DE-67B8-3922-BB35-773E5AFB6EBB}
- UpgradeCode
- {C1DFDF69-5945-32F2-A35E-EE94C99C7CF4}
ARM64 · MSI · 所有使用者
靜默安裝
msiexec /i googlechromestandaloneenterprise_arm64.msi /qn /norestart寫入記錄檔
msiexec /i googlechromestandaloneenterprise_arm64.msi /qn /norestart /l*v "%TEMP%\google-chrome-install.log"解除安裝
msiexec /x {8CAFEFE2-CDDF-3198-8DA4-9C19DD9F0714} /qn /norestart- MSI產品代碼
- {8CAFEFE2-CDDF-3198-8DA4-9C19DD9F0714}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8CAFEFE2-CDDF-3198-8DA4-9C19DD9F0714}
- UpgradeCode
- {C1DFDF69-5945-32F2-A35E-EE94C99C7CF4}
32位元 · MSI · 所有使用者
靜默安裝
msiexec /i googlechromestandaloneenterprise.msi /qn /norestart寫入記錄檔
msiexec /i googlechromestandaloneenterprise.msi /qn /norestart /l*v "%TEMP%\google-chrome-install.log"解除安裝
msiexec /x {00016FE3-603D-30A8-A18D-286C6CF8D90D} /qn /norestart- MSI產品代碼
- {00016FE3-603D-30A8-A18D-286C6CF8D90D}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{00016FE3-603D-30A8-A18D-286C6CF8D90D}
- UpgradeCode
- {C1DFDF69-5945-32F2-A35E-EE94C99C7CF4}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-google-chrome.ps1
$url = 'https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi'
$sha256 = '55EDACD348B4C1C9B291DAB19E4665929C7A127C013D9625970BE924F893273F'
$file = Join-Path $env:TEMP 'googlechromestandaloneenterprise64.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait install-google-chrome.ps1
$url = 'https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise_arm64.msi'
$sha256 = 'C9D72C63776AA8A4B3212D413376CF1CE24CF007F9DBA9A048B73CB0F08F41B1'
$file = Join-Path $env:TEMP 'googlechromestandaloneenterprise_arm64.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait install-google-chrome.ps1
$url = 'https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise.msi'
$sha256 = 'D57347B99605CD231726FDD605A0F21C6BA9750F3B688697F8F008E2B96984FA'
$file = Join-Path $env:TEMP 'googlechromestandaloneenterprise.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait