Display Popup from script executed as System user

1

I've a scheduled task, executed by System user. It's can sometimes display a popup to interacts with the user. This work fine if I launch the script myself, but not displaying when launched by the scheduled task with system user.

I use Start-Job as the current user to display the popup, but isn't working.

How can I display a popup/msgbox (need to be topmost window) for interacts with user (need to know the pushed button) from a script launched by system account ?

Khorwin

Posted 2016-06-14T15:12:26.197

Reputation: 23

If you want the user to interact with the process then the process has to be run in the user's context. You can run it with elevated rights in the user's context but it still has to be in the user's context. – EBGreen – 2016-06-14T15:19:37.220

It's for internal company laptops, and the users haven't the administrator rights, so, with the elevated rights option; does this mean that the script will run as user selected but with rights equivalent to an Administrator / system user? Or just with maximum rights that has this non-administrator user? – Khorwin – 2016-06-14T15:30:17.883

Answers

0

You'll need two processes. One for the task, setup with system permissions, and one for the popup, setup with user permissions. When a popup is needed, the task process creates a popup process and they open communications with each other (to pass the popup results if necessary).

Ouroborus

Posted 2016-06-14T15:12:26.197

Reputation: 2 549