From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

custom PATH for application

Hi everyone,

I am trying to adjust the windows PATH environment variable for my application, but I do not want to modify the global PATH. Is there an option in the build specification that I don't see? Any other built-in method?

One way to do this is to launch the application with a custom shortcut like this. Another way would be to start the application from a bat file that sets the PATH. Both would need to be created from a post-install script which proves rather difficult 😉


For context: this issue comes up because I want to ship an embedded python environment with my application. For the Call Python Node to find python, it needs to be listed in the PATH.

Cord

0 Kudos
Message 1 of 2
(1,750 Views)

Nevermind, I didn't realise I can set this from within the application. You can call SetEnvironmentVariable in the kernel32.dll as described here: https://lavag.org/topic/2994-system-variables-in-windows

0 Kudos
Message 2 of 2
(1,730 Views)