Terminate Install

Got a problem you cannot solve? Try here.
Post Reply
Nicke
Posts: 5
Joined: Mon Jan 23, 2006 10:08 am

Terminate Install

Post by Nicke »

Hi,

I'm new to InstallAware (but I really like it more and more :D). I've made a rather small installscript which runs a VB program at the end of installation. If the user hit cancel in my program I want to do an uninstall.

Everything works perfect except that the installprogram still remains in the Control Panel - Add remove programs. When I click on the "Remove" button (in the control panel) I get a warning that the program already is uninstalled and I am asked if I want to remove it from the list.

This behaviour I want to get rid of.

What I do is really simple:

Run Program $SUPPORTDIR$\\LicenseActivation.exe $SUPPORTDIR$\\License.ini|$LIC_PRODUCT$|$LIC_DATABASE$ (WAIT)
if Variable SUCCESS Equals 1
Install/Remove MSI Package {4C7144F6-FEEE-4977-AB5E-80625A1B9143}[REMOVE=ALL]
Terminate Install

end


Is this the wrong way to do it?

Thanks for the help.

/Nicke
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Hi Nicke,

This is one method to do it, but with this method, you need to use Delete Registry to remove the registry entires for the Control Panel | Add Remove Programs applet.

Another way to do it would be to call Apply Uninstall, which will remove the product right away, including the registry entries. There is really no right or wrong - but I think I'd recommend Apply Uninstall here, as you are doing a full uninstall of your product. In fact, I'd set the variable REMOVE to TRUE and then call GoTo Label Main Install!

Either way, the question remains - why would you rather not run this VB program before actually installing your product?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Nicke
Posts: 5
Joined: Mon Jan 23, 2006 10:08 am

Post by Nicke »

Thanks for your answer, I will test it.

The reason I can't run my VB program before the installation is that I can't be sure the client has the dll, ocx or VB run time files to run my VB program.

/Nicke
Post Reply