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

Abort installation from InstallScript

I have an InstallScript MSI Project.

A Custom Action calls a Script function.

The script displays a dialog and if cancel is selected the installation needs to rollback.

If the script returns ERROR_INSTALL_FAILURE the
error "ERROR_INSTALL_FAILURE 1603 Fatal error during installation" is displayed and the installation crashes.

If the script returns ERROR_INSTALL_USEREXIT no crash happens but the installation just stops. You do not see the rollback occuring. The program is not installed but some files are still in the Temp folder.

Does anyone know the correct return value to use in the script?

thanks
Labels (1)
0 Kudos
(3) Replies
Not applicable

Do you have a log of this behaivor? Also, when are you cancelling the setup? There can only be a rollback if the setup is cancelled in the deferred execution portion of the execute sequence.
0 Kudos
hanksmart
Level 3

I am very new to InstallShield, going on week 2, so not sure where the log file is located.

You are probably correct in that execution is being halted too late.

Do you know why the Microsoft Installer would crash when ERROR_INSTALL_FAILURE is retured from the script, and if ERROR_INSTALL_USEREXIT is the correct return code?
0 Kudos
Not applicable

I'm not sure what you mean by crash. To me, crash indicates that the Dr. Watson error dialog (or some other equivalent dependent on the OS) appears informing you that the application exited unexpectedly. If this is the case then it would indicate that something threw an exception or returned some kind of unexpected error result.

This is not expected behavior, but without answering the initial question of where you're doing this, I can't really say for sure what would cause that.

For more information on creating an InstallScript MSI log file, please reference this article:
http://support.installshield.com/kb/view.asp?articleid=Q105237

To be honest, if you're new to InstallShield, you might consider starting with a Basic MSI project since it's more simple than the InstallScript MSI project. These kinds of issues are a lot more clear and have very few possible causes. InstallScript MSI exascerbates these kinds of issues if you're unfamiliar with the MSI technology.
0 Kudos