Environment Variable: PATH
Hi Guys.
How do I retrieve the "PATH" environment variable? I'm using the "Get
System Information" dialog, second option is "Expand Environment Variable",
what's the third field? Have tried "Path" but it doesn't seem to work.
Thanks..
Best Regards,
Gary.
Gary James
Strategy, South Africa
Web: www.strategyonline.co.za
Blog: www.strategyonline.co.za/blog
Re: Environment Variable: PATH
Hi Gary,
To retrieve the PATH environment variable, you have to enter PATH in the 3rd
field.
For example (line may wrap):
Set Variable %PATHVAR% to ScriptItem->Get System Information(Expand Environment Variable) of "PATH"
Does this help?
Friedrich
--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder 5
Re: Environment Variable: PATH
Hi Friedrich.
Wow! Thanks for the quick reply.. That's not working here..
"COMPUTERNAME" works fine, but "Path" or "PATH" return nothing.. Using the
latest SB.. Any ideas? Running WinXP Pro.
Best Regards,
Gary.
Gary James
Strategy, South Africa
Web: www.strategyonline.co.za
Blog: www.strategyonline.co.za/blog
Re: Environment Variable: PATH
Hi Gary,
Sorry, but I have no idea. I have tested this on all machines here (2000,
XP, x64, 2003, and Vista) and it always returned the correct PATH
environment variable. Perhaps your PATH variable is > 1023 bytes. In
general, the path variable is limited to 1023 bytes. In XP SP this
increased to 2048 bytes.
SetupBuilder variables have a 1024 byte limit, so perhaps this is the
problem.
HTH,
Friedrich
Re: Environment Variable: PATH
Hi Friedrich.
My path was at 1318 characters (this is a test machine <g>). I reduced that
to under 1024 (768) but it's still not working.. I'll keep fiddling and let
you know if I find anything..
Thanks..
Best Regards,
Gary.
Gary James
Strategy, South Africa
Web: www.strategyonline.co.za
Blog: www.strategyonline.co.za/blog
Re: Environment Variable: PATH
Hi Gary,
We are using a Windows API call here: ExpandEnvironmentStrings()
I don't know if your machine hit another Windows limit :-(
http://www.lindersoft.com/forums/showthread.php?t=1065
Friedrich
Re: Environment Variable: PATH
Hi Friedrich.
Just ran the same compiled script on a new machine (XP Pro, very little
installed on it) and I get the same result..
This is what I'm doing:
Set Variable %PATHVAR% to ScriptItem->Get System Information(Expand
Environment Variable) of "PATH"
Display Message Box "%PATHVAR%" -- "PATH"
Displays nothing.. COMPUTERNAME works fine though.. Sorry for being a
nuisance.. I'll keep fiddling this side..
Best Regards,
Gary.
Gary James
Strategy, South Africa
Web: www.strategyonline.co.za
Blog: www.strategyonline.co.za/blog
1 Attachment(s)
Re: Environment Variable: PATH
Hi Gary,
I have attached my test script (Gary.sb5). It works fine on all machines
here (see screenshot).
What happens if you call the ExpandEnvironmentStrings() Windows API from a
Clarion test application?
Friedrich
Re: Environment Variable: PATH
Hi Friedrich.
Thanks, I appreciate the help.. Your script did the same as mine this side
(on 3 machines), it shows nothing in the message box.. I have to leave the
office in about 5 minutes, I'll play around with the API later this weekend
and let you know what I find.. Very weird..
Best Regards,
Gary.
Gary James
Strategy, South Africa
Web: www.strategyonline.co.za
Blog: www.strategyonline.co.za/blog
1 Attachment(s)
Re: Environment Variable: PATH
Friedrich's script on XP Pro SP2 laptop
Jane Fleming