I am trying to use the custom action "Run a PowerShell inline script" to make my installer pop up a warning dialog. The boiler plate code that gets added gives me the ability to show a dialog and it works just fine except for one problem: The dialog pops up
behind my installer window. I didn't realize this and thought the installer had hung. It was only when I moved it that I saw the dialog.
How can I make the dialog appear in front?
Here is the code to show the dialog that AI put into the task when I created it
Code: Select all
# When testing or debugging your script, you can quickly display a message box
[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms')
[System.Windows.Forms.MessageBox]::Show($helloMessage)
I've looked up the documentation for
Code: Select all
System.Windows.Format.MessageBox.Show
and there do seem to be many overloads. But about the only parameter I can see in those overloads that might let me specify a parent window is the
interface argument. I don't think I have access to that in my script.
FOLLOW US
Get the latest news in Application Packaging