Error While running a program after creating EXE!

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Niroj@Work
Pro Scripter
Posts: 63
Joined: Thu Dec 10, 2009 8:13 am

Error While running a program after creating EXE!

Post by Niroj@Work » Thu Apr 22, 2010 9:49 am

RunProgram>%SCRIPT_DIR%\ValidateDB.exe /DB_VAL_STRING="%DB_VAL_STRING%" /CHK_FIELDS="%CHK_FIELDS%" /DB_REQ_STRING="%DB_REQ_STRING%" /FILE_NAME="%SheetDir%\%TcId%\%TcId%.txt"

The above code mentioned is present inside the different program MainScript.scp. The duo are working fine when I am running through Macroscheduler editor but the same is not working when I created the MainScript.exe and trying to run it.

It is just displaying a warning message and coming out.
The message is as given below:
Error executing (filepath..)/ValidateDB.exe /all variable list...
(-1)


After this it is not working. Why (-1) is coming at the last of the line?
What may be the problem?

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Apr 23, 2010 9:20 am

Hi,

I would expect that you need quotes around the executable path:

Code: Select all

RunProgram>"%SCRIPT_DIR%\ValidateDB.exe" /DB_VAL_STRING="%DB_VAL_STRING%" /CHK_FIELDS="%CHK_FIELDS%" /DB_REQ_STRING="%DB_REQ_STRING%" /FILE_NAME="%SheetDir%\%TcId%\%TcId%.txt"
Make sure that ValidateDB.exe is in the same folder as the .exe (SCRIPT_DIR)
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Niroj@Work
Pro Scripter
Posts: 63
Joined: Thu Dec 10, 2009 8:13 am

Post by Niroj@Work » Fri Apr 30, 2010 6:30 am

As per your suggestion I put the double quotes while calling another program but now I am facing a new problem.

Sometimes If I am calling more then one instance of the program then the system is getting hanged. Here the RP_WAIT value is set to 0; so the main script does not wait for the child Exe to be finished first and it invokes another child program instances in parallel. The child exe is calling WinSCP internally which I used for sFTP.

After hanging the system for few time the OS closes the Window Explorer itself showing "Dr. Watson debugger...messages.." and even another message "Access Violation at address 004CA680 in module 'msche.exe'. Read of address 0000001C" message is getting displayed.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts