我可以从命令行创建一个任务,如下所示:
- schtasks /create /tn SoMetask /tr "do.bat arg1 arg2" /sc ONCE /st 00:00:00 /sd 01/01/1991
现在我需要删除它.但是,该命令需要确认,我不知道如何从BATCH文件(bat / cmd)中执行此操作.@H_502_4@
- C:\> schtasks /delete /tn ContextSwitchTask
- WARNING: Are you sure you want to remove the task "ContextSwitchTask" (Y/N)?
- C:\> echo Y | schtasks /delete /tn ContextSwitchTask
- WARNING: Are you sure you want to remove the task "ContextSwitchTask" (Y/N)? Y
- ERROR: Invalid input.
- Type "SCHTASKS /DELETE /?" for usage.
- C:\> schtasks /delete /tn ContextSwitchTask /f