anom217
Level 8

Input dialog using user32.dll

I'm doing a Basic MSI project. When the user uninstalls the product, I need to prompt the user for the database password to execute uninstall scripts for the database. But if the product is removed using the Remove button under Add/Remove Programs, it only calls the Execute sequence and not the UI sequence of Windows Installer.

So I was considering having a custom action during the Execute phase that can display a dialog with a single input text field so I can grab the password, in case the UI phase is not called.

Is there an easy way to create a dialog to do this using user32.dll? It seems fairly challenging to do. Or is there an easier alternative to do what I need than calling a DLL to construct dialogs.
Labels (1)
0 Kudos
2 Replies
RobertDickau
Flexera Alumni

As in [thread=194229]this similar thread[/thread], showing UI elements in the Execute sequence tends to cause problems. Disabling the Remove button (which carries out the uninstallation such that the UI sequence is skipped) isn't an option?
0 Kudos
anom217
Level 8

I have disabled the Repair button, as a solution for now, however, it would be nice to be able to remove the product from Add/Remove Programs. I was trying to gauge the difficulty of using Windows DLLs to construct and display a dialog because during an uninstall the user always needs to be prompted for a database password. There is no need for a silent uninstall.
0 Kudos