When delivering any software package containing a batch file, the result is always "Exit code 1 indicates possible error", even though the batch file runs fine when tested locally. The problem happens even with the most trivial batch files, that are verified not to contain any syntax errors, or reasons for exiting with code 1.

Here's what you might notice if the software delivery job check window is visible:

Each time a Command Window (cmd.exe) is launched, the contents of this registry value is read and executed immediately.

One example might simply be "cd\":

<Please see attached file for image>

When the software delivery agent attempts to execute the batch file, an arbitrary "cd\" command is first given, changing the working directory away from the location of the batch file. The result is Exit Code 1 as the batch file is not present in the new current directory.

Environment:

Client Automation (ITCM) -- any version.

Resolution:

The solution is to delete the AutoRun value from the Command Processor registry key. Once the value is removed, Software Delivery jobs containing batch files will be able to execute successfully.