cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
USchumacher
Level 3

Check in OnMaintUIBefore if the setup is running from Control Panel --> Uninstall

Hi all,

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

Thanks in advance
Ulrich
Labels (1)
0 Kudos
(3) Replies
skolte
Level 7

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.
0 Kudos
USchumacher
Level 3

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.
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

You should be able to use the ADDREMOVE variable to condition on running from Add/Remove Programs or not from OnMaintUIBefore.
0 Kudos