PDA

View Full Version : The exit or abort statement does not work in Windows 10



Magnus
02-22-2016, 12:47 AM
Hello

I am using Installshield 2015 (version 22). I have a BasicMSI Project. I have written a conditional statement in my InstallShield Script code, called from an Custom Action as given below.

if(condition==yes)
{
exit;
}

The "exit " statement does not work on Windows 10 but works fine on Windows 7.
I've tried the "abort" statement but it does not work either.

It would be of great help if somebody suggests a solution to this issue.

Thanks in advance
Magnus

eladef
02-22-2016, 06:47 AM
Hi

This is what I got from InstallShield support ( and it works... )

If you are doing this in an MSI based installation in a custom action, the custom action should be returning the value so that Windows Installer will exit if needed. For exiting an MSI install, you should be able to return ERROR_INSTALL_FAILURE or ERROR_INSTALL_USEREXIT instead of the abort statement, which is there to abort InstallScript installations.

For more information on custom action return values, please refer to the following article:
http://helpnet.flexerasoftware.com/installshield22helplib/installshield22helplib.htm#StartTopic=helplibrary/IHelpIScriptCAReturnValues.htm

Magnus
02-23-2016, 12:04 AM
Thanks, thats works fine!

Regards
Magnus