Install LabVIEW to a different directory
Table of Contents
Instructions for installing LabVIEW 2021 to a different directory (other than C:\Program Files)
Installing LabVIEW 2021
If you’re like me and like to keep your installed applications on a separate drive. Or working in multiple LabVIEW versions and want to keep each version issolated, this post is for you. Installing LabVIEW to a different directory requires a bit of setup but ensures that all LabVIEW files are issolated and confined to their own unique installation directories but it’s worth it to not have to worry about cross-version dependencies.
Note: Virtual machines are an entirely different subject, this article focusses on the installation process
Follow these steps to install LabVIEW 2020+ to a different location.
Overview
By default, LabVIEW installs to C:\Program Files\National Instruments
and C:\Program Files (x86)\National Instruments
directories for LabVIEW x64 & x86 respectively. Instructions to install LabVIEW into a different directory are vague or incomplete with NI Package Manager + LabVIEW 2020+ versions.
This article describes the process to install LabVIEW 2021 (w/ NI Package Manager) into a different directory. NIPM automatically installs to C:\Program Files\National Instruments\NI Package Manager
without warning, so before we start the NIPM installation we need to create/edit some registry keys.
1. Create NI Package Manager Registry Keys
Create the following NI Package Manager registry keys to install NIPM to a different directory.
Using Registry Editor (requires Admin privledges) create:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\National Instruments\NI Package Manager\CurrentVersion
Path (string) = D:\NI\NIPM\
HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\NI Package Manager\CurrentVersion
Path (string) = D:\NI\NIPM\
In this example, we’ll install NI Package Manager to D:\NI\NIPM
. Both paths for x86 and x64 should point to the same destination directory D:\NI\NIPM
.
(Don’t install NI Package Manager yet.)
2. Create LabVIEW Registry Keys
Create the LabVIEW installation registery keys to specify where LabVIEW x86 and/or x64 gets installed.
Using Registry Editor (requires Admin privledges) create:
KEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\National Instruments\Common\Installer
NIDIR (string) = D:\NI\NIx86\
HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\Common\Installer
NIDIR64 (string) = D:\NI\NIx64\
In this example, we’ll install LabVIEW x86 to D:\NI\NIx86
and LabVIEW x64 to D:\NI\NIx64
. These paths should be unique for x86 and x64.
3. Install NI Package Manager
Run the NI Package Manager installer, once complete all NIPM files should be located in D:\NI\NIPM
directory.
Note: At this point no files should exist in C:\Program Files\National Instruments\NI Package Manager
. If there are, uninstall NIPM and check the registry keys above and reinstall NIPM.
4. Install LabVIEW
From NI Package Mangaer, install LabVIEW. Everything (except IVI Foundation) should install to the D:\NI\NIx86
or D:\NI\NIx64
directories.
The only thing created in C:\Program Files\National Instruments
should be the IVI Foundation
which annoyingly ignores the registry keys.
(Do not reboot the machine yet)
5. Modify IVI Foundation
The IVI Foundation component is a set of shared driver components used by NI for hardware communication and control. The IVI Foundation is independent of NI but the toolkit is included when installing LabVIEW.
Unfortunately, the IVI Foundation files install to their original destination, which in this case is C:\Program Files (x86)\National Instruments\VI Foundation
.
The following steps are needed to move the installed IVI files, update the registry keys and edit the system environment variables to point to our D:\NI\NIx86
and D:\NI\NIx64
directories.
5.a. IVI Foundation - Move Files
All LabVIEW components should install to our D:\NI\NIxXX
directories except for the IVI Foundation
component which does not use the LabVIEW registry keys. Move all IVI Foundation folders to the destination installation directory:
Move C:\Program Files\IVI Foundataion
to D:\NI\NIx64\IVI Foundataion
Move C:\Program Files (x86)\IVI Foundation
to D:\NI\NIx86\IVI Foundation
5.b. IVI Foundation - Edit Registry Keys
Edit the following IVI Foundation keys to specify the new desination directory:
HKEY_LOCAL_MACHINE\SOFTWARE\IVI\VisaPxiPlugin\NIPxiPalPlugin
Library (string) = D:\Apps\NI\NIx64\IVI Foundation\VISA\Win64\NIvisa\PxiPlugins\NiViPpiP.dll
HKEY_LOCAL_MACHINE\SOFTWARE\VXIPNP_Alliance\VXIPNP\CurrentVersion
FRAMEWORK_PATH (string) = D:\Apps\NI\NIx64\IVI Foundation\VISA\Win64\
FrameworkPath (string) = D:\Apps\NI\NIx64\IVI Foundation\VISA\Win64\
VXIPNPPATH (string) = D:\Apps\NI\NIx64\IVI Foundation\VISA\
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\IVI\VisaPxiPlugin\NIPxiPalPlugin
Library (string) = D:\Apps\NI\NIx86\IVI Foundation\VISA\WinNT\NIvisa\PxiPlugins\NiViPpiP.dll
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\VXIPNP_Alliance\VXIPNP\CurrentVersion
FRAMEWORK_PATH (string) = D:\Apps\NI\NIx86\IVI Foundation\VISA\WinNT\
FrameworkPath (string) = D:\Apps\NI\NIx86\IVI Foundation\VISA\WinNT\
VXIPNPPATH (string) = D:\Apps\NI\NIx86\IVI Foundation\VISA\
5.c. IVI Foundation - Edit System Environment Variables
Edit the system environment Path
variables to point to the new IVI Foundation location.
From Start > Settings > Search “Edit the environment system variables”, open the System Properties window and on the Advanced tab, select ‘Environment Variables…’.
Under the ‘System variables’ section, edit the following variables to edit the paths of the IVI Foundation variables:
Path=
D:\NI\NIx64\IVI Foundation\VISA\WinNT\Bin\;
D:\NI\NIx86\IVI Foundation\VISA\WinNT\Bin\;
D:\NI\NIx64\IVI Foundation\VISA\Win64\Bin\;
VXIPNPPATH=
D:\NI\NIx86\IVI Foundation\VISA\
VXIPNPPATH64=
D:\NI\NIx64\IVI Foundation\VISA\
6. Reboot
At this point, all LabVIEW files should be installed to our D:\NI\NIx86
and D:\NI\NIx64
directories.
Note: No files should exist in the C:\Program Files\National Instruments
or C:\Program Files (x86)\National Instruments
directories.
Reboot the machine and open LabVIEW to verify all files are installed successfully.
Congratulations, LabVIEW in now installed to a different directory!