PDA

View Full Version : Check in OnMaintUIBefore if the setup is running from Control Panel --> Uninstall



USchumacher
11-08-2011, 12:00 PM
Hi all,

how can i check in OnMaintUIBefore if the setup is running from
Control Panel --> Uninstall?

Thanks in advance
Ulrich

skolte
11-08-2011, 12:05 PM
Go to Behavior & Logic > InstallScript, from the dropdowns at the top, select 'Before Move Data' in the first and select 'OnMaintUIBefore' on the second one. It will now either add the built-in code to your script, or if you have already added the code to override the built-in code, it will jump there. Just before Dlg_Start, you can add
MessageBox("Inside OnMaintUIBefore", 0);

When you build and run the installer, install the program, and then go to Add/Remove program to repair / modify / remove, it will now show you the message dialog you just added.

USchumacher
11-08-2011, 12:12 PM
Thanks for your quick answer!

This is clear.

I need a different logic in OnMaintUIBefore if the user starts the setup from control panel --> uninstall or just starts setup.exe again.

joshstechnij
11-08-2011, 04:07 PM
You should be able to use the ADDREMOVE variable to condition on running from Add/Remove Programs or not from OnMaintUIBefore.