Celeb Glow
general | March 10, 2026

What does return code 1 mean for cmd.exe on Windows XP?

I'm trying to run a task hourly with the Task Scheduler to launch a bat file, but it is not working. Looking at the history, I see the following which looks to be the issue:

Task Scheduler successfully completed task "\Random" , instance "{c19041aa-939d-4876-a12d-456fc3e632ce}" , action "C:\Windows\SYSTEM32\cmd.exe" with return code 1.

What does return code 1 mean for cmd.exe? How can I get more verbose debugging information? My task worked at first, but then it stopped after a couple days.

3

2 Answers

Instead of putting the full file path in the program/script textbox, use the Start in (Optional) field to put the folder that the .bat file is actually in.

Once you have done this, make sure you tick the 'Run with highest privileges' tick box

And that's it. Its now returning the correct result code 0x0 and my script is running! Finally.

If your batch file uses Robocopy it might just be the exit code for that. In robocopy nonzero errorlevel doesn't necessarily mean that something went wrong.

These might be informative in such cases:

This won't really help OP anymore, but I'm posting this here because this page was in the top results of the searches I made while researching for solutions for similar issue.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy