Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force Inno Setup setup to fail when Run command fails?

Tags:

inno-setup

I have some commands in the [Run] section of my Inno Setup script. Right now, if any of them returns a failure code (non-zero return value), the setup continues without any warning to the user. The desired behavior is to have the setup fail and roll back.

How do I enable this? I couldn't find any flag for the Run entry that would force this behavior. Am I missing something?

like image 204
DSO Avatar asked Jul 13 '09 23:07

DSO


People also ask

Which of the command line parameter is used to suppress logging?

To prevent this behavior, you can suppress the log file by specifying /LogFile= (with no filename argument) after Installutil.exe on the command line.

What is Suppressmsgboxes?

/SUPPRESSMSGBOXESInstructs Setup to suppress message boxes. Only has an effect when combined with '/SILENT' or '/VERYSILENT'. The default response in situations where there's a choice is: Yes in a 'Keep newer file? ' situation.


1 Answers

As far as I'm concerned, you have to use [Code] section for that, run the files with Exec function, check ResultCode upon return and run your uninstall script.

like image 200
GSerg Avatar answered Sep 26 '22 19:09

GSerg