I have a setup project that I inherited that uses the ProjectInstaller AfterInstall method to show a custom form, prompting the user to enter configuration options, which are then saved in the app.config file
Is there a way to determine what flags where passed to MSIExec, so that we could supress this form if /passive was used for example?
We would then push out a custom app.config file to the server after install.
Use UILevel
property to determine at what UI level the installer runs.
Excerpt from Determining UI Level from a Custom Action:
a custom action that has a dialog box should only display the dialog when the user interface level is Full UI or Reduced UI, it should not display the dialog if the user interface level is Basic UI or None. You should use the
UILevel
property to determine the current user interface level.
From the description of /passive
option:
The equivalent Windows Installer Command-Line Option is
/qb!-
withREBOOTPROMPT=S
set on the command line.
It means the installer is run with Basic UI, with no modal dialogs displayed (-
), with Cancel button hidden (!
).