0
votes

I have created a task in task scheduler.

Its basically a powershell script which has to run in interactive mode.

Task is running under SYSTEM account.

In Actions tab, under Program/Script I have added path of the ServiceUI.exe e.g, C:**\ServiceUI.exe Under Add arguments option, I have added C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -Windowstyle hidden -NoProfile -Executionpolicy bypass -file "C:**\PS1.ps1"

When I run the task, powershell window prompt shows for a fraction of a second.

Could someone please suggest a way to hide it?

Yes this is a long standing complaint. stackoverflow.com/questions/1802127/… - js2010
Yes, I have see that, and tried quite a few of the solutions mentioned in the link. However, it still doesn't work. Only difference I could find is, my task is rununning ServiceUI.exe as program'script in the Actions tab, and all other commands are added as arguments. Am I missing somethign here, or can it be doen in a different way. - Rajneesh Jha
The one using vbscript works for me. - js2010