Skip to content

Instantly share code, notes, and snippets.

Huseyin M Ozyilmaz huseyinozyilmaz

View GitHub Profile
@huseyinozyilmaz
huseyinozyilmaz / install-chrome.ps1
Created Apr 10, 2018
Install Google Chrome with Powershell
View install-chrome.ps1
$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)
You can’t perform that action at this time.