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?
Error While running a program after creating EXE!
Moderators: Dorian (MJT support), JRL
-
- Pro Scripter
- Posts: 63
- Joined: Thu Dec 10, 2009 8:13 am
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Hi,
I would expect that you need quotes around the executable path:
Make sure that ValidateDB.exe is in the same folder as the .exe (SCRIPT_DIR)
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"
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Pro Scripter
- Posts: 63
- Joined: Thu Dec 10, 2009 8:13 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.
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.