From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-26-2007 05:36 AM
10-26-2007 09:53 AM
10-26-2007 09:59 AM
HKEY_CLASSES_ROOT\CLSID\{B2794EF6-C0B6-11D0-939C-0020AF68E893}\InprocServer32
This will be a value like C:\Program Files\National Instruments\TestStand 4.0\bin\teapi.dll
Now iterate through all the version keys under HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\TestStand\.
Under each version key, get the value of the Path key. This will be something like C:\Program Files\National Instruments\TestStand 4.0\
The active version is indicated by whichever version key contains the path that the registered teapi.dll resides under. So, strip bin\teapi.dll off the end of the path from InprocServer32 and compare it to the path under each version key until you find a match. Be sure to do a case insensitive comparison and it would probably be a good idea to strip off trailing backslashes in case one path has one and the other doesn't.
You might be tempted to parse the version from the InprocServer32 path, but that won't necessarily work if the user changes the default installation directory.
Note, if you don't mind instantiating the engine, you can instead just access properties such as Engine.MajorVersion, Engine.MinorVersion, Engine.RevisionVersion, or Engine.VersionString.
09-25-2009 05:19 AM
There is one more possible solution. In the registry, we can see the following key name
"HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\TestStand"
Under this, depending on the number of installed versions of TestStand, we can find a number of sub keys with the version number.
The RegisteredInteropAssemblies and VSCodeGenRegistered key value (found in
"HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\TestStand\version\RegisteredInteropAssemblies" and
"HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\TestStand\version\VSCodeGenRegistered" )
is set to true for the active version. else false.
By just iterating through these version sub keys and reading the values of RegisteredInteropAssemblies or VSCodeGenRegistered, we can identify the active version.
This has worked fine so far. In case you spot only potential pitfalls, please let me know.
08-10-2021 02:14 AM
I have installed today and I don't know how to move forward, that {BC7...} folder is also not available in registry directory.
08-10-2021 05:31 AM
It worked after a restart 🙂
08-15-2021 06:21 AM - edited 08-15-2021 06:55 AM
Wouldn't it be easier to use RunState.Engine.VersionString
? See this.
To list all the versions installed you can use nipkg.exe CLI. In example you can filter all 32-bit versions like this: C:\Program Files\National Instruments\NI Package Manager>nipkg.exe list-installed ni-teststand-????-x*
(note that nipkg help mentions regex but it is just simple pattern matching, so for 64-bit version you would need to use slightly different matching).