How to delete scheduled task from command line without confirmation? (schtasks delete)
-
I can create a task from command line like this: schtasks /create /tn SomeTask /tr "do.bat arg1 arg2" /sc ONCE /st 00:00:00 /sd 01/01/1991 and now I need to delete it. However the command needs to be confirmed and I don't know how to do that from BATCH file (bat/cmd). 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. Question: How to delete scheduled task and force yes?
-
Answer:
C:\> schtasks /delete /tn ContextSwitchTask /f
Tomas Mirezko at Server Fault Visit the source
Related Q & A:
- How to remove path of my command line?Best solution by Super User
- How to delete a particular line from a file?Best solution by Stack Overflow
- How to create jar file from command line?Best solution by Stack Overflow
- How to delete a line from a .txt file in node.js?Best solution by c-sharpcorner.com
- How to change brightness on Linux desktop through the command line?Best solution by Super User
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.