LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically checking for the version of NIDAQmx

Solved!
Go to solution

Hello,

 

Does anybody know how I can (programmatically) check the version of NIDAQmx that is currently installed on a computer, via C or Windows Scripting Host?

 

I had the experience today, that a DLL compiled against NIDAQmx-8.9.5f2 on one computer didn't run on systems with NIDAQmx-8.8.0f7. The DLL had to be recompiled for this to work. Upgrading so both machines are at 8.9.5f2 solved the problem. However, my users won't know this immediately and the problem may be very difficult and frustrating to find.

 

This will be used as a precheck script on my InstallShield project to see if everything is at the correct level. I have such checks already for CVI by looking at the version field of the DLL itself. Could it be something similar?

 

Thanks,

Jason. 

0 Kudos
Message 1 of 4
(3,275 Views)
Solution
Accepted by jcurl
yes, the software version is stored in the registry. Look in HKEY_LOCAL_MACHINE>SOFTWARE>National Instruments>NI-DAQ and NI-DAQmx.
0 Kudos
Message 2 of 4
(3,267 Views)

Programmatically, in general, you can use the "RegRead..." functions of the Programmer's Toolbox library to get registry key values.

 

The actual function name depends on the type of data you want to read.

Specificly, for the DAQmx version, use the function call below:

 

char buf[256];

unsigned int size; 

RegReadString (REGKEY_HKLM, "SOFTWARE\\National Instruments\\NI-DAQmx\\CurrentVersion", "Version", buf, 256, &size); 

 

Hope this helps,

S. Eren BALCI
IMESTEK
0 Kudos
Message 3 of 4
(3,250 Views)

there is also the possibility to use the Ini_ReadFromRegistry (, 1, ); command; it can be found in the inifile instrument driver - I don't know which one does better...

probably both are similar, so if you are already using one driver (toolbox or inifile) you might choose the corresponding function

Message Edited by Wolfgang on 03-26-2010 08:24 AM
0 Kudos
Message 4 of 4
(3,246 Views)