如何使用SCHTASKS在SYSTEM用户帐户下创建计划任务 [英] How to create a scheduled task under SYSTEM user account with SCHTASKS

查看:56
本文介绍了如何使用SCHTASKS在SYSTEM用户帐户下创建计划任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试使用以下命令让 SCHTASKS 在 SYSTEM 帐户下创建计划任务:

I am currently trying to get SCHTASKS to create a scheduled task under the SYSTEM account, by using the following command:

schtasks.exe" /s "\\" /u "SYSTEM" /Create /SC DAILY /MO "7" /ST "12:00" /TN "mytask" /TR  "C:\test.exe "C:\""

虽然它输出:

ERROR: User credentials are not allowed on the local machine.

推荐答案

  1. 打开提升的(管理员)命令提示符.

  1. Open an elevated (admin) command prompt.

输入以下命令:

schtasks.exe/s "\"/ru "SYSTEM"/Create/SC DAILY/MO "7"/ST "12:00"/TN "mytask"/TR "C:\test.exe "C:\"

schtasks.exe /s "\" /ru "SYSTEM" /Create /SC DAILY /MO "7" /ST "12:00" /TN "mytask" /TR "C:\test.exe "C:\"

请注意区别在于,为了指定SYSTEM帐户,您需要使用/RU开关而不是/U开关.

Please note the difference is that, in order to specify the SYSTEM account, you need to use the /RU switch and not the /U one.

这篇关于如何使用SCHTASKS在SYSTEM用户帐户下创建计划任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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