Hello,
How do I suppress it ?
I think that a good way of suppressing the message boxes during a silent install would be to condition them. To do so, you can make use of the
"UILevel" property. The installer sets the "UILevel" property to the level of the user interface. The internal UI is enabled and set by "MsiSetInternalUI". This property is set to one of the following:
- 2 --> completely silent install
- 3 --> simple progress and error handling
- 4 --> authored UI, wizard dialogs suppressed
- 5 --> full UI
In order to get the "UILevel" property value in a custom action, you can have a look on our
"How to set an installer property using custom actions". After doing so, you can simply condition your message boxes to be spawned only during full UI installs. For instance, here is a little PowerShell script that spawns a message box only during full UI installations.
Code: Select all
Add-Type -AssemblyName PresentationFramework
$var = AI_GetMsiProperty UILevel
if($var -eq '5'){
[System.Windows.MessageBox]::Show($var)
}
Hope this helps.
Kind regards,
Catalin