LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Edit XP's Environmental Variables

Is it possible, using LabVIEW, to edit the Path option in Windows XP Environmental Variables?
0 Kudos
Message 1 of 4
(2,580 Views)
The command path=dir1;dir2;dir3 will set the PATH environment variable. However, that only endures until the command window closes. In the scope of LabVIEW you would use System Exec to issue a command line action (e.g., "cmd /c path=dir1;dir2;dir3"). But, you would need to do whatever you want to do within the command process that gets executed by System Exec. You can do this by putting your actions in a batch file and call the batch file instead. If you want to persist the change you need to use something like setx.exe which is part of the Windows XP Service Pack 2 Support Tools.
0 Kudos
Message 2 of 4
(2,575 Views)
Thanks much for that answer. If the edit doesn't persist I would have to alter my approach to my problem. If I could, let me ask  one more question: Is there a command that can read in the current Path string within Environmental variables?
0 Kudos
Message 3 of 4
(2,570 Views)
You can just do this:

What are you trying to accomplish with the PATH environment variable?


Message Edited by smercurio_fc on 07-23-2008 01:47 PM
0 Kudos
Message 4 of 4
(2,560 Views)