c# - Dialog box for a user with an active session - Stack Overflow

My task is to update a program on users' computers. I will do this by running a script on behalf o

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743940391a4533418.html

相关推荐

  • c# - Dialog box for a user with an active session - Stack Overflow

    My task is to update a program on users' computers. I will do this by running a script on behalf o

    2天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信