Turn off the progress bar while downloading Chrome

Windows PowerShell re-renders progress on every buffer, so a 120 MB download
spends most of its time drawing a bar rather than transferring - minutes for
what should be seconds, and indistinguishable from a stall while you watch the
byte count crawl.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-08-31 17:10:39 -05:00
co-authored by Claude Opus 5
parent 389c714caf
commit 7e82a294fa
+11
View File
@@ -94,8 +94,19 @@ if (-not $Remove -and -not (Find-Chrome)) {
# are already elevated by this point, so this needs no second prompt.
$msi = Join-Path $env:TEMP 'googlechromestandaloneenterprise64.msi'
Write-Host 'Google Chrome is not installed — downloading it from Google (about 120 MB).'
# Progress off for the duration. Windows PowerShell re-renders the progress
# bar on every buffer, which on a 120 MB file costs far more time than the
# transfer itself — minutes instead of seconds, looking for all the world
# like a stalled download.
$previousProgress = $ProgressPreference
$ProgressPreference = 'SilentlyContinue'
try {
Invoke-WebRequest -Uri 'https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi' `
-OutFile $msi -UseBasicParsing
} finally {
$ProgressPreference = $previousProgress
}
Write-Host 'Installing Chrome...'
$msiexec = Start-Process msiexec.exe -Wait -PassThru -ArgumentList @('/i', "`"$msi`"", '/qn', '/norestart')