none
Simple CMD script giving me an Exit Code 9009 indicates possible error.

    Question

  • I have created a small CMD file to run an exe file, sleep for the time needed to run exe, and then exit the cmd window.

    The cmd file will open, run, and close with successful results on my local machine when ran from the folder with the exe also in it.

    I am using CA's IT Client Manager to package the setup files and script and push it down to networked clients. The job fails on the target machines with the Exit code 9009 indicates possible error.

    When I look this error code up I get:
    Program is not recognized as an internal or external command, operable program or batch file. Usually indicates that command, application name or path has been misspelled when configuring the Action.

    I am thinking I need to change a path maybe for the script to run on client machines from the push, but am new to CMD/BATCH files and do not know what is required to do this.

    My script is as follows:
    setup.exe /config config.xml
    sleep 300
    exit

    It is located in the same folder as the exe.

    Any help would be greatly appreciated.

    Dennis

    Thursday, March 10, 2011 6:07 PM

Answers

  • Hi,

    I am not familiar with CA's IT Client Manager, but you are probably right that the problem is that the task can't find the setup.exe and/or the sleep.exe.

    Two thoughts:

    1. You probably need to have the path to setup.exe in your script. For example: %~dp0setup.exe (%~dp0 will expand to the drive and path of the currently running script). If you use this, then of course setup.exe must sit in the same directory as the script.
    2. Why sleep?

    Bill

    Thursday, March 10, 2011 6:23 PM
    Moderator
  • The error message means that the batch file is unable to locate setup.exe, most likely because you supplied neither drive letter nor the name of the folder where it resides. This is absolutely compulsory for batch files! The same goes for config.xml and sleep.exe - where do they reside?

    Note also that the following command is a native substitute for sleep.exe:

    ping  localhost -n 300 > nul

    Thursday, March 10, 2011 6:37 PM

All replies

  • Hi,

    I am not familiar with CA's IT Client Manager, but you are probably right that the problem is that the task can't find the setup.exe and/or the sleep.exe.

    Two thoughts:

    1. You probably need to have the path to setup.exe in your script. For example: %~dp0setup.exe (%~dp0 will expand to the drive and path of the currently running script). If you use this, then of course setup.exe must sit in the same directory as the script.
    2. Why sleep?

    Bill

    Thursday, March 10, 2011 6:23 PM
    Moderator
  • The error message means that the batch file is unable to locate setup.exe, most likely because you supplied neither drive letter nor the name of the folder where it resides. This is absolutely compulsory for batch files! The same goes for config.xml and sleep.exe - where do they reside?

    Note also that the following command is a native substitute for sleep.exe:

    ping  localhost -n 300 > nul

    Thursday, March 10, 2011 6:37 PM