03-25-2010 01:26 PM
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.
Solved! Go to Solution.
03-25-2010 01:48 PM
03-26-2010 01:15 AM
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,
03-26-2010 02:16 AM - edited 03-26-2010 02:24 AM
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