07-12-2013 07:26 AM
I'm trying to improve the installer script for a package that builds against NI-VISA (on Windows). Is there any officially recommended way (e.g. config file, registry key) to find the include directory (for visa.h) and the library directory (for visa32.dll for example)?
(Other than brute-force searching the file system or asking the user to provide the path...)
07-12-2013 09:19 AM
The path to the VISA installation is contained in the key HKEY_LOCAL_MACHINE\SOFTWARE\VXIPNP_Alliance\VXIPNP\CurrentVersion. The relevant value is the VXIPNPPATH string, whose data contains the path. This is the only relevant path for a 32-bit windows system.
On a 64-bit windows system, the above registry entry is valid for the 64-bit VISA library. For simplicity, the 32-bit install location (that can be found from the 32-bit hive of the registry, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VXIPNP_Alliance\VXIPNP\CurrentVersion) contains the header as well as both the 32-bit and 64-bit libraries that you can link against.
Please let me know if you need more clarification.
- Pankaj