Programmatically Creating a Scheduled Task in Windows - 0x8004130f Error

前端 未结 3 529
无人共我
无人共我 2021-02-02 14:36

I am having major problems getting a scheduled task to run. The task is created fine using the ITaskScheduler interface provided by Microsoft. The task is set to run only if a u

3条回答
  •  借酒劲吻你
    2021-02-02 15:03

    The GoogleUpdateTaskMachine Task uses the "NT AUTHORITY\SYSTEM" to Run the task. You can do this by using schtasks command and the /ru switch with "System" or "" as the parameter. Like this:

    schtasks /create /tn "My App" /tr c:\apps\myapp.exe /sc monthly /d 15 /ru "System"
    

    It does not prompt for a password.

    See technet for more info.

提交回复
热议问题