LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set widnows environment variables on launch of LabVIEW

I know that there are solutions ofr achieveing this with executables, and I can do it VI by VI, but I want to do this once, I want them to become part of my development environment, but not all environments, and I wondered if there were a better way than my current plan of creating my own exe to launch labview.

0 Kudos
Message 1 of 4
(2,611 Views)

How about creating a batch file to startup your LabVIEW system which first sets the environment variable and then launches LabVIEW? Executables launched from a batch file should inherit the entire environment of whoever started them up.

 

Something along the lines of:

 

SET MYENV="your value"

START "C:\Program Files (x86)\National Instruments\LabVIEW 2014\LabVIEW.exe"

 

Batch/shell script files may seem so last century, but they are still a viable and very powerfull means in all current operating systems.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(2,602 Views)

They do indeed, which is what I'm using on my own machine, but for distribution to our production environment (which all uses labview development environments - scientific research needing quick responses that don't take time to build and deploy sometimes - and this was the design decision my colleagues made) that won't work as an option, unless I turn the batch into an exe, and replace the associated program for VIs to use that exe and alter all links to use it - which is a big job on 40+ machines, but a script to alter on startup would be far quicker. We may just end up permanently setting the environment variables, but I thought I'd ask for any other ideas.

0 Kudos
Message 3 of 4
(2,594 Views)

Not sure if this helps but I wrote a utility a while ago for reading/writing environment variables.  It doesn't do anything special just reg edit stuff and command line.

 

http://lavag.org/files/file/7-windows-environment-variable-reader-writer/

0 Kudos
Message 4 of 4
(2,564 Views)