6

我对如何安排任务在系统启动时使用 schtasks 命令行作为 SYSTEM 运行有点困惑,并且我已经阅读了 MS 在 schtasks.exe 上的文档。这里有人可以帮助我。

4

3 回答 3

14

以下命令安排 MyApp 程序在每次系统启动时运行,从 2001 年 3 月 15 日开始:日期是可选的。

schtasks /create /tn "My App" /tr c:\apps\myapp.exe /sc onstart /sd 03/15/2001
于 2013-07-03T01:55:57.897 回答
4

使用 /RU SYSTEM 使任务作为系统运行。

有关其他信息,请参阅 http://support.microsoft.com/kb/814596

于 2015-03-04T20:49:10.170 回答
2

您可以指定用于任务级别和命令级别的帐户。

/U to specify user account that should be used to run the actual command /RU to specify user account that should be used to execute the scheduled task

默认情况下,两者都将使用“系统”帐户,即具有登录用户的权限。

更多详情:https ://technet.microsoft.com/en-us/library/bb490996.aspx

于 2017-05-09T07:52:30.287 回答