fleet/ee/maintained-apps/inputs/winget/scripts/google_chrome_install.ps1

23 lines
428 B
PowerShell
Raw Normal View History

$exeFilePath = "${env:INSTALLER_PATH}"
try {
$processOptions = @{
FilePath = "$exeFilePath"
ArgumentList = "--do-not-launch-chrome --system-level"
PassThru = $true
Wait = $true
}
# Start process and track exit code
$process = Start-Process @processOptions
$exitCode = $process.ExitCode
# Prints the exit code
Write-Host "Install exit code: $exitCode"
Exit $exitCode
} catch {
Write-Host "Error: $_"
Exit 1
}