Hi all, I’ve used this toolkit for hundreds of packages over the years, a recent request from the business has me needing to do something a bit different, in short, I need to run a custom function I’ve written only if the exit code is not 0
The good news is the exe handles exit codes, but I’m unsure how I can run my script only if the exit code is not 0, for example if it spits out 1 I’d like to run .\jason.ps1 if the exit code is 0 the toolkit should just process like normal
Ahh that’s ideal for one of my issues, any exit code from the setup.exe will pass through to SCCM or MEM thank you.
Is there any variable that I can extract the exit code from? I had plans to write the last exit code to a registry location, as this software is a security scan, so ideally I’m keeping lots of logs for the audit.
$returnCode looks like it might be what I’m after ?