Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to create a really simple task that uses sdelete command as a scheduled task but when I run the task the CMD just flickers on and off and does not perform the task, so I want to see what it is doing on the CMD to troubleshoot the problem by keeping it on after it has completed.

program/script:

C:\Windows\System32\cmd.exe

Argument:

/c "sdelete -z"

Start in:

C:\Users
share|improve this question

3 Answers 3

up vote 2 down vote accepted

Create a new text file and put this in it:

sdelete -z
pause

Save this file as test.bat, making sure to select "All Files" in the filetype dropdown, to avoid the file being named test.bat.txt.

Now run the batch file.The pause command will pause script execution and allow you to see any output in the command window.

share|improve this answer

Place pause at the end of the script and it will pause until a key press is reconsidered

Although if this is not a script and just an argument place > output.txt at the end and it will output the argument to a file called output.txt in the location it was run

share|improve this answer

The argument " /c " after cmd.exe just carries out the command and then terminates the CMD, but you can use

cmd.exe /k "sdelete -z"

that carries out the command too, but remains.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.