mirror of
https://github.com/fleetdm/fleet
synced 2026-05-02 02:47:30 +00:00
28 lines
657 B
PowerShell
28 lines
657 B
PowerShell
|
|
# Learn more about .exe install scripts:
|
||
|
|
# http://fleetdm.com/learn-more-about/exe-install-scripts
|
||
|
|
|
||
|
|
$exeFilePath = "${env:INSTALLER_PATH}"
|
||
|
|
|
||
|
|
try {
|
||
|
|
|
||
|
|
# Add arguments to install silently (Cursor uses an Inno Setup-based installer)
|
||
|
|
$processOptions = @{
|
||
|
|
FilePath = "$exeFilePath"
|
||
|
|
ArgumentList = "/SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /CLOSEAPPLICATIONS /MERGETASKS=!runcode"
|
||
|
|
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
|
||
|
|
}
|