Failing if msiexec already running instead of Completing with Exit Code 1618

Anyone have any examples or code snippets for Windows software installs that will check to see if msiexec.exe is already running and cause the action to Fail (so it will run again based on Action parameters) instead of allowing the action to Complete with Exit Code 1618 (“Another installation is already in progress”)?

continue if {not exists process "msiexec.exe"}

1 Like

For some reason, I was thinking of something more involved, using exit with a code or something. This should work though, so why overcomplicate it? :slight_smile: Thanks!

You could use the exit code after trying your MSI install, to fail it only in the case of 1618, or pass only for “good” codes… These would need to come after your ‘wait’ command attempts the msiexec

// Fail only on 1618
continue if {exit code of action <> 1618}

Or

// Success only on good exit codes from msiexec
continue if {exit code of action = 0 or exit code of action = 3010 }
1 Like