Author |
Message |
merp
Joined: 22 Sep 2008 Posts: 8 Country: United States |
|
Create process failed. Return code: 193 - %1 is not a valid |
|
I created a job that will launch a DOS batch command. The error message resulted, and I attempted to debug.
24x7 Scheduler - Exampe Jobs.dat
An error occurred while executing automation script.
Line 3: Create process failed. Return code: 193 - %1 is not a valid Win32 application.
Continue testing this job?
[Yes] [No]
I tested my batch command in the DOS command window, and that worked fine. What could be the answer?
Thank you.
|
|
Mon Sep 22, 2008 9:20 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Please provide the complete command line as it is entered in the job properties.
|
|
Mon Sep 22, 2008 10:13 pm |
|
 |
merp
Joined: 22 Sep 2008 Posts: 8 Country: United States |
|
|
|
The complete command line as it is entered in the job properties is as follows:
Dim numDownload_run_id, number
Run("D:\TopNotch Download\Download\Automation\CheckTNDownloadDone\CheckTNDownloadDone.bat", "", numDownload_run_id)
Exit
|
|
Tue Sep 23, 2008 5:47 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
1. For such simple thing, why do you create a script job and not a simple a program type job? Just enter the command line correctly into the command line job property of program type job and you are done. Of course the command must be entered correctly so that the OS can understand it, in your case you would need to wrap file path in double quotes or alternatively don't enter the path and enter it as is into the startup directory property
2. Now, if you decide to stick with a script type job, you will need to fix it. As I mentioned before, your batch file command line contains spaces in the file path and so it must be wrapped in double quotes, for example,
 |
 |
Run("\"C:\\Program Files\\My Program Folder\\prog.exe\" param_no_space \"param with space\"", "", pid) |
or easier
 |
 |
Run("prog.exe param_no_space \"param with space\"", "C:\\Program Files\\My Program Folder", pid) |
I'll leave the original command line for you to modify as a practice :)
If you fail, let us know and we'll help you out.
3. Couple other tips:
Exit is not needed at the end of the script, Exit statement can be used in a middle of a script, in case you want to abort script execution before reaching the end.
You may want to read "Special ASCII characters" top in the only help to learn hot to properly use back-slash symbol in JAL scripts.
Hope all of the above will help you to get started fast
|
|
Tue Sep 23, 2008 6:07 pm |
|
 |
merp
Joined: 22 Sep 2008 Posts: 8 Country: United States |
|
|
|
This was an excerpt from the JAL script that has the problem:
Dim numRun_id, number
Run("CheckTNDownloadDone.bat", "D:\\TopNotch Download\\Download\\Automation\\CheckDownloadDone", numRun_id)
The error this time was:
An error occurred while executing automation script.
Line 2: Create process failed. Return code: 2 - The system cannot find the file specified.
Continue testing this job?
[Yes] [No]
What did I miss? Thank you.
|
|
Tue Sep 23, 2008 10:55 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
What do you get in D:\mylog.log file when when doing the following
 |
 |
Run("cmd /C CheckTNDownloadDone.bat > D:\\mylog.log", "D:\\TopNotch Download\\Download\\Automation\\CheckDownloadDone", numRun_id) |
|
|
Tue Sep 23, 2008 11:00 pm |
|
 |
merp
Joined: 22 Sep 2008 Posts: 8 Country: United States |
|
|
|
mylog.log file was created, but contents were blank.
|
|
Tue Sep 23, 2008 11:07 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
This means that the specified directory is valid, but cmd failed to run the specified batch file. Is the file name correct?
By the way, to capture both standard output and standard errors from cmd you can change the command line to
 |
 |
Run("cmd /C CheckTNDownloadDone.bat 2>&1 D:\\mylog.log", "D:\\TopNotch Download\\Download\\Automation\\CheckDownloadDone", numRun_id) |
|
|
Tue Sep 23, 2008 11:47 pm |
|
 |
merp
Joined: 22 Sep 2008 Posts: 8 Country: United States |
|
|
|
Yes, you're right, I mis-typed the filename the most recent try.
The Run("cmd /C did the trick. Thanks for the tip about writing results to a log/text file. Looks like I'm good to go. Thank you very much for your helps. You replied quickly.
|
|
Wed Sep 24, 2008 2:55 am |
|
 |
DEEPAK JAIN
Joined: 26 Jun 2018 Posts: 5 Country: India |
|
Create process error 193 |
|
i am trying execute below command as program :
"@V"env:ZSLocation"\start_Importers.vbs"
getting below error :
Create process error 193,%1 is not a valid win32 application
|
|
Thu Aug 30, 2018 8:54 am |
|
 |
|