Skip to content

Instantly share code, notes, and snippets.

@huseyinozyilmaz
Created April 10, 2018 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huseyinozyilmaz/cd7f4857c15c2ae70f465219c875f43c to your computer and use it in GitHub Desktop.
Save huseyinozyilmaz/cd7f4857c15c2ae70f465219c875f43c to your computer and use it in GitHub Desktop.
Install Google Chrome with Powershell
$LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('https://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor = "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Installing..." | Write-Host; Start-Sleep -Seconds 2 } else { Remove-Item "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue } } Until (!$ProcessesFound)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment