Skip to content

Commit bdf87f8

Browse files
committed
Fix msiexec hang on Windows — add /qn /norestart to install.ps1
Without /qn, msiexec shows a UI dialog on error (e.g. MSI mutex conflict 1618). In Session 0 (SSM/non-interactive), this dialog is invisible and blocks indefinitely. Adding /qn ensures silent mode so errors return immediately. /norestart prevents unexpected reboots.
1 parent 9bbc50d commit bdf87f8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packaging/windows/install.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
Set-StrictMode -Version 2.0
1515
$ErrorActionPreference = "Stop"
1616

17-
Start-Process msiexec.exe -Wait -ArgumentList '/i amazon-cloudwatch-agent.msi'
17+
$proc = Start-Process msiexec.exe -Wait -PassThru -ArgumentList '/i amazon-cloudwatch-agent.msi /qn /norestart'
18+
if ($proc.ExitCode -ne 0 -and $proc.ExitCode -ne 3010) {
19+
throw "msiexec failed with exit code $($proc.ExitCode)"
20+
}
1821

1922
$CWADirectory = 'Amazon\AmazonCloudWatchAgent'
2023
$CWAProgramFiles = "${Env:ProgramFiles}\${CWADirectory}"

0 commit comments

Comments
 (0)