Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Launch Executable - Parameter issue

If you have a question or need help, this is the place to be.
Post Reply
confusednoobie
Posts: 2
Joined: Sat Feb 28, 2009 10:08 pm

Launch Executable - Parameter issue

Post by confusednoobie »

I'd like to launch this command

%SystemRoot%\ehome\ehshell.exe /entrypoint:{ad208fce-2431-47d6-abed-1974a2a0555f}\{7533724D-C7CB-4ac2-8AEE-1B0B91ADD393}

but it just fails with

Code: Select all

Error in Action: "Start Program: ehshell.exe"
Traceback (most recent call last) (1487):
  File "C:\Program Files\EventGhost\eg\Classes\ActionClass.py", line 164, in CallWrapper
  File "C:\Program Files\EventGhost\plugins\System\Execute.py", line 91, in __call__
  File "C:\Program Files\EventGhost\eg\Utils.py", line 202, in ParseString
  File "<string>", line 1
    ad208fce-2431-47d6-abed-1974a2a0555f
                     ^
SyntaxError: invalid syntax
regardless of what I do. Any ideas?

Thanks!
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Launch Executable - Parameter issue

Post by Pako »

Try instead of "{ad208fce-2431-47d6-abed-1974a2a0555f}" use "{{ad208fce-2431-47d6-abed-1974a2a0555f}"
and instead of "{7533724D-C7CB-4ac2-8AEE-1B0B91ADD393}" use "{{7533724D-C7CB-4ac2-8AEE-1B0B91ADD393}".
Otherwise, function "ParseString" remove the brackets.
Pako
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Launch Executable - Parameter issue

Post by jinxdone »

Comment out line 91 (EG 0.3.7) in file EventGhost\plugins\System\Execute.py and restart EG.

So that you have this:

Code: Select all

#        arguments = eg.ParseString(arguments)
This looks like a bug in EG, for some reason it parses the parameter used for curly braces.
confusednoobie
Posts: 2
Joined: Sat Feb 28, 2009 10:08 pm

Re: Launch Executable - Parameter issue

Post by confusednoobie »

Pako wrote:Try instead of "{ad208fce-2431-47d6-abed-1974a2a0555f}" use "{{ad208fce-2431-47d6-abed-1974a2a0555f}"
and instead of "{7533724D-C7CB-4ac2-8AEE-1B0B91ADD393}" use "{{7533724D-C7CB-4ac2-8AEE-1B0B91ADD393}".
Otherwise, function "ParseString" remove the brackets.
Pako
Thanks Pako, I tried this and the exe loads but it ignores the parameters
jinxdone wrote:Comment out line 91 (EG 0.3.7) in file EventGhost\plugins\System\Execute.py and restart EG.

So that you have this:

Code: Select all

#        arguments = eg.ParseString(arguments)
This looks like a bug in EG, for some reason it parses the parameter used for curly braces.
Many thanks! I commented out the line and all is good.
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Launch Executable - Parameter issue

Post by jinxdone »

Hehe now that I look at it Pako mentioned the same thing.

I don't get it why it parses the parameters as EG doesn't know about the app it's trying to run so why parse? As far as EG knows a program it's trying to run might actually expect a single { as input so it intentionally breaks it
rexian
Posts: 14
Joined: Wed Jun 17, 2009 4:54 pm

Re: Launch Executable - Parameter issue

Post by rexian »

This bug is still there in R1194 and had to comment line # 87 in Execute.py. Why do we parse the arguments? I initially thought it resolves environment variables like %windir% etc but it was unable to execute "%windir%\ehome\ehshell.exe".
Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: Launch Executable - Parameter issue

Post by Bartman »

rexian wrote:Why do we parse the arguments?
So you can use scripting to do much more powerful makros. Don't see a bug and pako already said how to prevent eg from parsing.
Post Reply