schtasks SYSTEM失败 [英] schtasks SYSTEM fails

查看:459
本文介绍了schtasks SYSTEM失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请注意 此处 ,在帮助中您可以设置运行方式。

It is noted here and in the help that you can set "run as".

/RU  username      Specifies the "run as" user account (user context)
                       under which the task runs. For the system account,
                       valid values are "", "NT AUTHORITY\SYSTEM"
                       or "SYSTEM".

从我的测试这些命令将启动任务

From my tests these commands will start the task

schtasks /create /sc once /st 00:00 /f /tr foo.exe /tn bar
schtasks /run /i /tn bar

但是以SYSTEM运行不会启动 foo.exe p>

However running it as SYSTEM will not launch foo.exe

schtasks /create /sc once /st 00:00 /f /tr foo.exe /tn bar /ru SYSTEM
schtasks /run /i /tn bar

我想以SYSTEM运行的原因是在另一个问题说,这样做本质上将在没有窗口的背景中运行 foo.exe

The reason I would like to run as SYSTEM is because it was said in the other question that doing so would essentially run foo.exe in the background without a window.

推荐答案

它适用于我

C:\Windows\system32>schtasks /create /sc once /st 09:36 /f /tr notepad.exe /tn bar /ru SYSTEM
SUCCESS: The scheduled task "bar" has successfully been created.

它也使用

C:\Windows\system32>schtasks /run /i /tn bar
SUCCESS: Attempted to run the scheduled task "bar".

这篇关于schtasks SYSTEM失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆