简体   繁体   English

Powershell脚本运行任务计划程序将无法启动Photoshop

[英]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.

相关问题 如何在静默/隐藏模式下使用任务调度程序运行powershell脚本? - How to run powershell script using task scheduler in silent/hidden mode? Powershell 脚本无法使用任务计划程序正常运行 - Powershell Script Can't Run Properly With Task Scheduler VBScript 不会从从 Windows 任务计划程序运行的 Powershell 脚本中运行 - VBScript will not run from Powershell script that runs from Windows Task Scheduler 如何手动或在任务计划程序中运行 PowerShell / ImapX 脚本? - How to run a PowerShell / ImapX script manually or in Task Scheduler? 使用任务计划程序计划的Powershell脚本无法运行…脚本运行正常 - Powershell script scheduled using Task scheduler doesn't run…script runs fine 使用Windows Task Scheduler运行的PowerShell脚本未运行SQL Server SSIS DTEXEC.EXE作业 - PowerShell script run using Windows Task Scheduler is not running a SQL Server SSIS DTEXEC.EXE job 如果脚本在后台(例如 Windows 任务计划程序)或用户会话中运行,如何检查 PowerShell - How to check in PowerShell if the script was run in background (e.g. Windows Task Scheduler) or in user session 使用任务计划程序每4小时运行一次脚本 - run a script every 4 hours with task scheduler 任务计划程序中的 Psql 不运行文件脚本 - Psql in Task Scheduler does not run a file script 在机器启动时运行 Powershell 脚本? - Run Powershell script on machine start?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM