I'm trying to advertise an application using SCCM 2007 and use a PowerShell script to throw a couple of message boxes to inform the user on installation progress.
The deployment works fine and installs the application, however no message boxes appear when running the advertisement. I assume this is because the script is not running as the logged on user.
Should not that running the script locally throws the message boxes without issue. Is there any way I can modify my script to ensure that the messages appear?
Here is the script:
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[System.Windows.Forms.MessageBox]::Show("Software Installation in progress. Please wait...")
$installer = Start-Process -FilePath .\VirtualBox-4.3.14-95030-Win.exe -ArgumentList --silent -Wait -Verb RunAs
[System.Windows.Forms.MessageBox]::Show("Installation Complete. You can now launch the application.")
can you make sure that your program is set to allow for user interaction?