SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Create process failed. Return code: 193 - %1 is not a valid

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Create process failed. Return code: 193 - %1 is not a valid
Author Message
merp



Joined: 22 Sep 2008
Posts: 8
Country: United States

Post Create process failed. Return code: 193 - %1 is not a valid Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6738

Post Reply with quote
Please provide the complete command line as it is entered in the job properties.
Mon Sep 22, 2008 10:13 pm View user's profile Send private message
merp



Joined: 22 Sep 2008
Posts: 8
Country: United States

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6738

Post Reply with quote
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,

Code:
Run("\"C:\\Program Files\\My Program Folder\\prog.exe\"   param_no_space   \"param with space\"", "", pid)

or easier
Code:
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 View user's profile Send private message
merp



Joined: 22 Sep 2008
Posts: 8
Country: United States

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6738

Post Reply with quote
What do you get in D:\mylog.log file when when doing the following

Code:
Run("cmd /C CheckTNDownloadDone.bat > D:\\mylog.log", "D:\\TopNotch Download\\Download\\Automation\\CheckDownloadDone", numRun_id)

Tue Sep 23, 2008 11:00 pm View user's profile Send private message
merp



Joined: 22 Sep 2008
Posts: 8
Country: United States

Post Reply with quote
mylog.log file was created, but contents were blank.
Tue Sep 23, 2008 11:07 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6738

Post Reply with quote
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
Code:
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 View user's profile Send private message
merp



Joined: 22 Sep 2008
Posts: 8
Country: United States

Post Reply with quote
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 View user's profile Send private message
DEEPAK JAIN



Joined: 26 Jun 2018
Posts: 5
Country: India

Post Create process error 193 Reply with quote
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 View user's profile Send private message Send e-mail
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.