This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- setting exit code for install script
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 30, 2009
10:47 AM
setting exit code for install script
Hi all,
Is there a way to set the exit code for a install script? If the user is running silently, then I want to be able to use exit codes to notify the user of any failures. For example, when running silently and the application is running, I want to exit the installer with a specific error code.
Thank you in advance
Jeff
Is there a way to set the exit code for a install script? If the user is running silently, then I want to be able to use exit codes to notify the user of any failures. For example, when running silently and the application is running, I want to exit the installer with a specific error code.
Thank you in advance
Jeff
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 30, 2009
04:20 PM
There isn't any method available to control the exit code for InstallScript setups. The best option would be to write a return code out to a log file of some sort, and then parse the log file to determine the exit code. (Note that even in MSI installations the exit code can't be controlled to this extent; only predefined exit codes are returned depending on the way the setup exited, general failure, user abort, or success/reboot pending.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 31, 2009
08:49 AM
Are we able to write to the same log file provided with the f2 command switch?
Thanks
Jeff
Thanks
Jeff
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 31, 2009
11:45 AM
It would probably be possible to use the WriteProfInt and WriteProfString functions to write a custom section, keyword, and value to the log. However, the location of the log is not publicly available to script code. The location could possibly be passed with /z and read from the CMDLINE variable.