[英]Powershell script run task scheduler will not start photoshop
I have this command in a powershell script file. 我在Powershell脚本文件中有此命令。 When I run the script from the powershell, it'll start photoshop and do some scripted things before photoshop quits it selves.
当我从Powershell运行脚本时,它将启动Photoshop,并在Photoshop自行退出之前做一些脚本化的事情。
Start-Process "C:\Program Files\Adobe\Adobe Photoshop CC 2018\Photoshop.exe" -Wait
But when I run the powershell script with windows task scheduler, it doesnt start photoshop at all. 但是,当我使用Windows Task Scheduler运行Powershell脚本时,它根本不会启动photoshop。
Powershell.exe -ExecutionPolicy Bypass "C:\path\scriptPS1"
The task is running as my own user. 该任务以我自己的用户身份运行。
When I checked off "Run whether user is logged on or not", it worked. 当我选中“运行用户是否已登录”时,它起作用了。
I managed to find this out when i created a single task in the task scheduler that only started Photoshop by it self. 当我在任务计划程序中创建一个仅由它自己启动Photoshop的任务时,我设法找到了答案。 And when I turned on the "Run whether user is logged on or not", the task scheduler was unable to start photoshop.
当我打开“无论用户是否登录都运行”时,任务计划程序无法启动photoshop。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.