Skip to content

Instantly share code, notes, and snippets.

@sblack4
Last active November 13, 2024 21:22
Show Gist options
  • Save sblack4/ff5eb11ae3668e31762350a2e9c44b8c to your computer and use it in GitHub Desktop.
Save sblack4/ff5eb11ae3668e31762350a2e9c44b8c to your computer and use it in GitHub Desktop.
# Set variables
$LocalTempDir = $env:TEMP
$ChromeInstaller = "ChromeInstaller.exe"
$ChromeInstallerPath = "$LocalTempDir\$ChromeInstaller"
# Download Chrome installer
$DownloadUrl = "http://dl.google.com/chrome/install/375.126/chrome_installer.exe"
Invoke-WebRequest -Uri $DownloadUrl -OutFile $ChromeInstallerPath
# Install Chrome silently
Start-Process -FilePath $ChromeInstallerPath -Args "/silent /install" -Verb RunAs -Wait
# Clean up the installer
Remove-Item $ChromeInstallerPath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment