using enviromental variables when calling programms

If you have a question or need help, this is the place to be.
Post Reply
Klayer
Posts: 3
Joined: Thu Feb 14, 2013 4:51 pm

using enviromental variables when calling programms

Post by Klayer » Fri Feb 15, 2013 5:16 pm

For portability reasons I would like to use environment variables when deploying the "start application" plugin.
Is there a way?

Example:
"C:\programs\test\test.exe" I would like to replace by "%PROGRAMFILES%\test\test.exe".

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

Re: using enviromental variables when calling programms

Post by Pako » Sat Feb 16, 2013 3:49 pm

Here in EventGhost you can access the system folders via eg.folderPath.
For example the %PROGRAMFILES% you get as eg.folderPath.ProgramFiles.
So, in the Start Application action you can do it like in the following example:
StartApplication.png
To see all available folders, you can do in a script:

Code: Select all

for name in eg.folderPath.__ALL__:
    print name + ": " + getattr(eg.folderPath, name)
Pako

Post Reply