From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Environment Variable fetching

Does anyone know how to fetch an environment
variable from Windows 2000; so that it can be
used to build a path to a file?

I have a .dll file that gets updated to a
specific directory tree, and the directory is
pointed to by an env. called %PRODUCT%

i.e.:

PRODUCT=C:\Test\Builds\1_1_1_5\


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 1 of 2
(2,532 Views)
I am using the System Exec.vi in win2000 for similar purposes. Make the command line "C:\winnt\system32\cmd.exe" (without the quotes), and then pass "set\n" (line feed at the end, no quotes) as the standard input to this command. It will return the environment variables in standard output, which you can then parse.

Hope this helps. Good luck.
0 Kudos
Message 2 of 2
(2,531 Views)