我有一个我想要自动运行的onstartup任务,无论是否有人登录.
原文链接:https://www.f2er.com/windows/370645.html我已将其设置为Run,无论用户是否登录,不存储password1,以及使用以下代码我认为可行的最高权限运行:
schtasks /create /tn "My OnStartup Task" /TR "powershell blah.ps1" /sc ONSTART /f /NP /RL HIGHEST
启用任务计划程序历史记录后,我收到的错误如下:
Event ID: 104: Task Scheduler Failed to log on "<Task Author>" . Failure occurred in "LsalogonUser" . User Action: Ensure the credentials for the task are correctly specified. Additional Data: Error Value: 2147943711. Event ID: 311: Task Scheduler Failed to start Task Engine "" process due to an error occurring in "LUAIsElevatedToken" . Command="taskeng.exe" . Additional Data: Error Value: 2147943711. Event ID: 101: Task Scheduler Failed to start "\My OnStartup Task" task for user "<Machine>\<Task Author>". Additional Data: Error Value: 2147943711.
我特意设置不存储密码,但错误是说它正在尝试使用密码.我记得在某个地方读过,而不是存储密码复选框也算是“不要以交互方式运行”或其他东西.有人能指出我在这里正确的方向吗?