Error RunProgram

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Liberty
Pro Scripter
Posts: 56
Joined: Wed Jun 06, 2007 11:56 am
Location: Sweden

Error RunProgram

Post by Liberty » Mon Sep 28, 2009 12:26 pm

In version 11 I got a new error in an old macro

RunProgram>XXX.exe
gives
Error executing XXX.exe (0)

WHAT to DO?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Sep 28, 2009 1:43 pm

I forget the specifics, but there was a point around version 10 that had a compatability issue. It was well warned about by Marcus and easy to work around. This may possibly be what you are seeing.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Liberty
Pro Scripter
Posts: 56
Joined: Wed Jun 06, 2007 11:56 am
Location: Sweden

Error executing

Post by Liberty » Mon Sep 28, 2009 1:52 pm

No it does not help me.

It worked in verison10 but not now.

I also use command line parameters like \SPEC

Pls help

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

Post by Marcus Tettmar » Mon Sep 28, 2009 2:42 pm

Hi,

I'm not sure why it would suddenly stop working but have you tried:

1. Make sure all paths, especially if they have spaces are in quotes. e.g.:

Run>"c:\program files\some app\somaeapp.exe" /parm1=value "parm with space"

2. Does the exe need to "start in" a folder? If so:

ChangeDirectory>c:\program files\some app
Run>"c:\program files\some app\someapp.exe" ....

3. Does the APP need ADMIN privs to run?

Let>RP_ADMIN=1
Run>....

4. Does the very same command line run from the Windows Start box or a CMD prompt. Copy and paste it. That can often give clues as to the problem.

5. Does ExecuteFile run the app ok?

Can you send us your real script and show us the path of the app?

If nothing helps please contact support and request a BeamYourScreen session and we'll connect up and help you get it going.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Liberty
Pro Scripter
Posts: 56
Joined: Wed Jun 06, 2007 11:56 am
Location: Sweden

Error RunProgram

Post by Liberty » Mon Sep 28, 2009 3:41 pm

1. The old working code is simple

Let>RP_WINDOWMODE=0
Change Directory>C:\LswIn
Run>Lsw.exe /SPEC
WaitWindowOpen>XXXXXX*
SetFocus>XXXXXX*

Lsw.exe is an own 16-bit C++ program running under XP.

I have found similar errors with other programs now.

I have also tried other variants.

Pls help.

2. How could this with a parameter be run through ExecuteFile?


3. Where do you have a description of cmd /C??

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

Post by Marcus Tettmar » Mon Sep 28, 2009 3:46 pm

Should work. Have you tried:

Run>"C:\LswIn\Lsw.exe" /SPEC

Or:

ExecuteFile>C:\LswIn\lsw.exe,/SPEC

Or:

Run>cmd.exe /c "C:\LswIn\Lsw.exe" /SPEC
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Liberty
Pro Scripter
Posts: 56
Joined: Wed Jun 06, 2007 11:56 am
Location: Sweden

Post by Liberty » Mon Sep 28, 2009 9:49 pm

Thank you.

RunProgram, which I used before, does not work.

ExecuteFile seems to work.

Run>cmd /c seems also to work -
it means that the program is run under the command prompt in a new subwindow (somewhat heavier)?

Explanation?

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Re: Error RunProgram

Post by jpuziano » Tue Sep 29, 2009 5:59 am

Hi Liberty,

I am also curious why that should work in MS 10 but not 11.

If the error happens right after the Run> statement, then we should be able to reproduce the error with just three lines:
Liberty wrote:Let>RP_WINDOWMODE=0
Change Directory>C:\LswIn
Run>Lsw.exe /SPEC
I am not sure what Lsw.exe does or where it came from but you said you've had the same problem with other exe's.

If anyone else can reproduce this with another exe utility, please post your findings. It may require a parameter to be passed to the exe utility to cause the error to occur.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

Liberty
Pro Scripter
Posts: 56
Joined: Wed Jun 06, 2007 11:56 am
Location: Sweden

Post by Liberty » Tue Sep 29, 2009 7:27 am

I have made these programs myself by using Visual C++ and have been using them for a long time, also with earlier versions of MacroScheduler.

It does not work without the parameter either.
Just the line RunProgram>"ExePath" is enough to cause the error.

All the parameters RP_........ cannot be used with ExecuteFile.

Do you have the corresponding for EF?

It is not good with problems coming up with new versions.
The earlier problem with a Macroexe protection fault on another XP computer has not been solved yet.

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