I have custom action VBS scripts running under InstallExecuteSequence->InstallExecute
They are to remove files and folders left behind by the application. (Configuration files).
I need to allow the user the option to either execute these scripts, or not, upon uninstall.
For uninstallation by simply re-executing the Installer file, this is simple. I simply add a checkBox called CHECKBOX_REMOVE_CONFIGURATION_FILES to VerifyRemoveDialog, with a value of 1, then in my Custom Action I use the condition:
(REMOVE="ALL") AND (CHECKBOX_REMOVE_CONFIGURATION_FILES="1")
The issue is how to replicate this behaviour when the msi is started with msiexec /x from the Control Panel Programs page or by command line.
I have for testing inserted a MessageBox into InstallExecute which can display YES/NO with the same option to delete configuration files, and set another property I can test.
The issue is, how can that messagebox possibly determine whether 1. The MSI was ran from msi.exe /x (no UI) when I DO want the messagebox to show, or (2) whether the installer has already displayed VerifyRemoveDialog (when I do NOT want the messagebox to show)
In other words, how is it possible to determine in InstallExecute whether or not the UI particularly the VerifyRemoveDialog has been shown?