Using Windows Environment Variables

Help each other out

Using Windows Environment Variables

Postby DaveG on Fri Aug 04, 2006 6:26 am

Does anyone know if it is possible to use Windows Environment Variables as part of the file name in an Execute File event? For instance, to launch windows explorer I thought I could use a file name %systemroot%\explorer.exe but that doesn't work. I've tried putting things in quotes, removed and added slashes etc. but to no avail.

I wanted to use %SYSTEMROOT% or %SYSTEMDRIVE% to make my skin portable between two machines that use different system drive letters ( C: and L:) and OSs ( XP and W2k). Does anyone know another way of achieving this?

Thanks
DaveG
 
Posts: 15
Joined: Fri Aug 04, 2006 6:07 am
Location: Milton Keynes, UK

Postby stevenhanna6 on Fri Aug 04, 2006 7:00 am

Easy fix, use this new exe, I add these new environment variables %systemroot%, %systemdrive%, %programfiles%

http://www.xlobby.com/xlobby2.zip

So your original idea of using

%systemroot%\explorer.exe

in os>execute file will now work.
stevenhanna6
 
Posts: 904
Joined: Tue Feb 18, 2003 10:39 am
Location: Ontario, Canada

Postby DaveG on Fri Aug 04, 2006 7:19 am

That works fine! Thanks for a very quick solution Steven.
DaveG
 
Posts: 15
Joined: Fri Aug 04, 2006 6:07 am
Location: Milton Keynes, UK