Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Exit installation

Updated: 21 May 2010 | 5 comments
Rivin's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

At the begining of my installation I check for some third party application and if it 's installaed, I prompt user to exit the install and to uninstall it. If user presses yes then the install has to exit. But I couldn't find any exit command. I thought Terminate is going to do the job, but it's not.
Thanks in advance.

discussion Filed Under:

Comments

EdT's picture
27
Nov
2009
0 Votes 0
Login to vote

Crystal ball is clouded today

Are you using Wisescript Editor or Windows Installer Editor?
I'm going to guess that you are using Windows Installer Editor as Wisescript has an Exit command.
So all you need to do is to set a property if you want to exit, then use that property as a condition on a Type 19 (Terminate Installation) custom action, so that the custom action will run when you want to terminate the install. The Type 19 custom action allows you to include an information string for the user.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Tiramisu's picture
04
Dec
2009
0 Votes 0
Login to vote

Fatal error after Terminate Installation

I use this post to ask about Terminate Installation action.

I'm doing the same thing...checking if third party application is installed and if not, exit installation.

I'm using Terminate Installation action, but every time after message is closed comes error message:

"Fatal Error

Installation ended prematurely because of an error."

I'm using Windows installer 7 and doing this after AppSearch and before CCPSearch. Four different cases and everytime this Fatal error appears after user clicks OK  Does not look very nice to user so how can I get rid of?

AngelD's picture
04
Dec
2009
0 Votes 0
Login to vote

Tiramisu, That's the way the

Tiramisu,

That's the way the terminate installation action works.
If you don't like it then you'll need to come up with something else.

EdT's picture
04
Dec
2009
1 Vote +1
Login to vote

Type 19 custom action

The standard windows installer type 19 custom action always reports a fatal error as you have noted.
However, you have the option of adding your own text to this terminate dialog, so you can either add text to indicate that the install was terminated by the user, or to explain that the fatal error message is standard.
Unfortunately, there is no other clean way to terminate an MSI install, so your only other option is to compile the MSI to EXE format, and use the wisescript stub wrapper code to do your checks and perform the exit, so that the MSI only gets executed when all the required conditions are met.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

CygnusX1's picture
10
Dec
2009
0 Votes 0
Login to vote

Optional way to exit

You can set a property and use that property in LaunchCondition.
You can also use vbscript function to call IDABORT

Function ExitSetup()
   Const IDABORT = 3
   ExitSetup=IDABORT
End Function

With this your script can write to the log, event viewer, or display a message to the installing user.