View Full Version : A way to disable the uninstall dialog in InstallScript MSI?

09-28-2011, 11:13 AM
I'm new to InstallShield. I am wondering if there is a way to disable the uninstall dialog (shown below) when you run setup.exe a second time.

Previously, the developers built the install purely with the code. What they have me doing is using some of what InstallShield has to offer, mainly just including most of the files needed for the install. I am still utilizing about 98 to 99 percent of their code after the change. We are looking into downsizing the code at some point in the near future.

When they did it with pure code, they never had the uninstall dialog pop up and they want to keep it that way just so that it doesn't confuse the customer. I believe the reason that it's popping up now is because I'm using some of InstallShield's features.

I'm currently using InstallShield 2008. If it's not possible with 2008, is it possible with the later versions? Should I upgrade?

Any help would be much appreciated.

09-29-2011, 12:31 PM
The prompt you are seeing is displayed by the OnMaintUIBefore event. Normally running a setup.exe again after it has been installed presents the maintenance selection dialog (modify, repair, remove) and not this prompt directly if the code in this event has not been changed. If the code in OnMaintUIBefore has been changed, or you would just like to change any maintenance behavior in general, you would need to look through this event and modify it as needed (note the prompt is just a MessageBox call).

09-30-2011, 11:17 AM
Is that the only way? We don't have that event handler in our code. Would the uninstall dialog be automatically called since I used the function FeatureTransferData?

10-03-2011, 01:45 PM
If OnMaintUIBefore has not been added to the script in this project, the project will run with the default OnMaintUIBefore code, which includes the prompt you are seeing. This event can be added to the script and modified to change the maintenance UI behavior.

10-03-2011, 02:25 PM
Ok, thanks!