cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
psmithson
Level 3

Running MSI installer in silent mode makes it succeed even in error situation

Jump to solution

Hi,

I have a little check in a custom action that is executed after the support files are extracted in an MSI based install shield script. It's set to synchronous, check exit code.

I call abort if I find a problem. I've also tried return ERROR_INSTALL_FAILURE but that didn't alter how it worked.

When I run the installer normally, if I call abort, the installer will stop and I'll get a dialog saying that it failed. But if I run it like this -

setup.exe /S /v" /qn+ INSTALLDIR=c:\tmp\blahblah"

Now it still fails to install but I get a dialog saying "Setup completed successfully". This is misleading. Also ERRORLEVEL is zero.

How can I fix this?

Thanks.

Peter

Labels (1)
0 Kudos
(1) Solution
psmithson
Level 3

Figured it out after reading other posts on silent mode. My custom action was in the UI sequence so not getting executed. I switched it to the Exec sequence and it worked for silent install but ran too late for a UI install (needs to run before other dialogs). So now I've put it in both sequences! Won't do any harm to run it more than once.

View solution in original post

0 Kudos
(2) Replies
psmithson
Level 3

Figured it out after reading other posts on silent mode. My custom action was in the UI sequence so not getting executed. I switched it to the Exec sequence and it worked for silent install but ran too late for a UI install (needs to run before other dialogs). So now I've put it in both sequences! Won't do any harm to run it more than once.

0 Kudos
Argh - but now it runs during an un-install which I don't want!
0 Kudos