Page 1 of 1

[bug] Could not execute command line!

Posted: 21 Jun 2012 14:28
by pjj
This is the error message which I get while invoking

Code: Select all

MainApp.RunAppAndWait("c:\windows\notepad.exe", "", false, false);
When I run

Code: Select all

MainApp.RunApp("c:\windows\notepad.exe", "", false, false);
nothing happens at all. What's wrong? And yes, I have notepad.exe in c:\windows directory (I tested other programs and locations, too). Probably it's not my firewall (I switched it off.)

(BTW, the docs are erroneous as per quoting strings: single quotes don't work, you get immediately
')' expected
error message.)

Re: [bug] Could not execute command line!

Posted: 23 Jun 2012 11:10
by Rickard Johansson
It's not really a bug. You just have to type

MainApp.RunAppAndWait("c:\\windows\\notepad.exe", "", false, false);

when using a C++ or Java script. In Pascal you can use

MainApp.RunAppAndWait('c:\windows\notepad.exe', '', false, false);

The documentation use single quotes as is used in a Pascal script, but it probably should tell the user to use double quotes in other script languages.

Re: [bug] Could not execute command line!

Posted: 23 Jun 2012 11:33
by pjj
What a coincidence! I came to conclusion I should have filled this in "Bugs" sections, so I started to move it there, when I saw you reply. Many thanks! You are, of course, right, double slash is the solution. And as for the docs, yes, they should tell the user to use double quotes. And I should write more about the docs, and I will -- but some other time. Thanks again.