My task is to update a program on users' computers. I will do this by running a script on behalf of the system account via the task scheduler.
But before starting the procedure of deleting and installing a new version, I want to get confirmation from the user that this can be done right now (the program will be closed).
I thought to send them a dialog box via Windows Forms MessageBox
, but I can't open the form in another user's session.
How can this be done?
Tried System.Windows.Forms.MessageBox
. Sent notification via msg.exe
- can't process user response result
For example, open a dialog box in a script:
[System.Windows.Forms.MessageBox]::Show($FrmMain,"Install now?", "Title", 4, 32)
I will run the script through the task scheduler on behalf of SYSTEM
. But I need the form to open in the user session that is currently open and not in the SYSTEM
session.