mirror of
https://github.com/fleetdm/fleet
synced 2026-04-24 15:07:29 +00:00
29 lines
659 B
Text
29 lines
659 B
Text
# Learn more about .exe install scripts:
|
|
# http://fleetdm.com/learn-more-about/exe-install-scripts
|
|
|
|
$exeFilePath = "${env:INSTALLER_PATH}"
|
|
|
|
try {
|
|
|
|
# Add argument to install silently
|
|
# Argument to make install silent depends on installer,
|
|
# each installer might use different argument (usually it's "/S" or "/s")
|
|
$processOptions = @{
|
|
FilePath = "$exeFilePath"
|
|
ArgumentList = "/S"
|
|
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
|
|
}
|