Answer the question
In order to leave comments, you need to log in
How to check if Google Chrome is installed and if not, install it?
There is a line from the initial script when installing GCWP
$LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://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) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound)
Answer the question
In order to leave comments, you need to log in
1. Google on Powershell check installed applications (if you want to check in the list of installed programs)
2. Google - Powershell check if foler\file exists (if you want to check a file or folder on a specific path)
3. Write a test condition if $true exit on the installed program from the list of installed programs or by the presence of a specific file or folder
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question