Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 6

Terminate Basic MSI from an Installscript CA run as defered


Here's the deal.

IS 2012 Pro Spring, Sp1.
Basic MSI.

I have an InstallScript custom action (that runs as defered), and checks for something.
If this something is found, I want to display a message (I know how to do that) and then I want to terminate the installation.

I believe I am currently terminating my installation with the following code after my MessageBox.

But the installation, presents a SetupCompleteSucess dialog.

I thought I would have seen a SetupCompleteError dialog instead. (Which is my preference.)

If my CA was not deferred, I would simply set a property in the preceding custom action and then follow it with a type 19 custom action.
Which I know doesn’t show a SetupCompleteSucess dialog

Can anyone give me an idea as to how I might terminate my installation with a SetupCompleteError dialog ?

Thanks for considering my problem.
Labels (1)
0 Kudos
(4) Replies
Level 6

One additional piece of information from a verbose log.

CustomAction StrongNameNotFound returned actual error code 1603 but will be translated to success due to continue marking

StrongNameNotFound is the name of my CA.

I wonder what "COntinue" marking means and how I might do anythng about this.
0 Kudos
Level 11

Hi Ray,

I was about to post that "ERROR_INSTALL_FAILURE *Should* get you SetupCompleteError...". But the log snippet explains it--you'll see that if you mark a custom action for "Synchronous (Ignores Exit Code)".

Hope this helps!

0 Kudos
Level 6

Excellent !

That is EXACTLY the solution I needed.

Right click on the CA and choose the CA Wizard.

Click the "Next" button until you arrive at the "Additional Options" screen.
I had chosen "Ignore exit code".
I changed it to "Check exit code".

That setting, in combination with return ERROR_INSTALL_FAILURE; generates the SetupSucessError dialog.
Which is EXACTLY what I was looking for.

You are the greatest !

Happy Easter !
0 Kudos
Level 16

What are you checking for? Script execution isn't generally the right time to be doing this. Normally you would do your discovery in the initialization phase and block the install from ever getting to the execution phase.

I'd suggest reading:

If you do keep it your way, be sure to have rollback custom actions to undo any changes you might have made to the system.
0 Kudos