Developer Center Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

RegisterAddon.exe not working while trying Tutorial

I'm running through the Tutorial for the Third Party Licensing & Activation Toolkit found here: https://decibel.ni.com/content/docs/DOC-16866

Working in LV2012, I created a licensed library and transferred it to a separate computer with LV2012 installed.  I dropped the licensed library into a project, and, as expected, it doesn't work because it's not registered.

I tried closing and opening LabVIEW, and it didn't register automatically, so I tried the method recommended by the Tutorial (page 😎 of using RegisterAddon.exe from the Windows command line.

It didn't work.  It did spit out a log file containing the following text:

###########################################
# Log file created at 2013/02/27 10:51:37 #
###########################################
2013/02/27 10:51:37: Entered "Get LabVIEW Install Dir"
2013/02/27 10:51:37: Entered "Get LabVIEW Registry Key"
2013/02/27 10:51:38: Error occured when getting LV dir:Error -314501 occurred at Get LabVIEW Registry Key.vi

This error code is undefined. Undefined errors might occur for a number of reasons. For example, no one has provided a description for the code, or you might have wired a number that is not an error code to the error code input.

Additionally, undefined error codes might occur because the error relates to a third-party object, such as the operating system or ActiveX. For these third-party errors, you might be able to obtain a description of the error by searching the Web for the error code (-314501) or for its hexadecimal representation (0xFFFB337B).

Any ideas about what's wrong?

0 Kudos
Message 1 of 15
(13,480 Views)

Goto this page for the error codes:

http://zone.ni.com/reference/en-XX/help/373159B-01/addonlicensing/tplatoolkit_error_codes/

-314501 Could not find the LabVIEW installation directory from the registry.

0 Kudos
Message 2 of 15
(6,926 Views)

Hm.  Any idea what registry key the software is looking for?  If I know that, I can check the registry to investigate the source of the problem.

0 Kudos
Message 3 of 15
(6,926 Views)

My guess is that you are not issuing the correct command line options to the RegisterAddon.exe

0 Kudos
Message 4 of 15
(6,926 Views)

Hi Paul,

To directly answer your question:

Any idea what registry key the software is looking for?

The exe is looking for the Path value located in HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\LabVIEW\<version> or HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\National Instruments\LabVIEW\<version> if using 32-bit LabVIEW on 64-bit machine (ugh, silly 64-bit Microsoft registry mayhem).

However, looking through the rest of the code it seems that the code is designed such that RegisterAddon.exe needs to be called from exactly "<LabVIEW>/resource/Partners/RegisterAddon.exe".  If the exe is moved anywhere else, it will throw the error you are seeing.  Are you calling the exe from somewhere different?

A few other ideas if the above doesn't work

2)  RegisterAddon.exe should be called with Administrative priveleges

3)  We made changes to RegisterAddon in 2011 such that the command line parameters have changed. 

  • If you are in LabVIEW 2011 or later, you need to call RegisterAddon as described in the document you are referring (RegisterAddon.exe -- -s -l “vi.lib\MyCompany\MyToolkit\MyToolkit.lvlib")
  • If you are in LabVIEW 2010, the parameters are different, try RegisterAddon.exe -- -l “vi.lib\MyCompany\MyToolkit\MyToolkit.lvlib"

4) If none of the above, can you take a screen shot of your registry with all keys expanded under National Instruments and different LV versions?  Also can you tell me what LabVIEW version you are using as well as OS version and bitness?

Sorry for the difficulty you are experiencing, but hopefully we can figure this out.

David

0 Kudos
Message 5 of 15
(6,926 Views)

What is the desired final installation method of your licensed library? If this will eventually be packaged and installed with VIPM. Then you don't need to worry about any of the RegisterAddon.exe stuff. VIPM automatically registers the licensed addon with LabVIEW as part of the install process.

But If you're just walking through the tutorial process, then I can see how this would be important.

0 Kudos
Message 6 of 15
(6,926 Views)

Right now I'm exploring multiple paths for licensing software (libraries and executable, with and without VIPM, etc.)  So I'm going through all the tutorials.  Ultimately I'm interested in creating executables than can be expanded using multiple licensed modules.  But for now I'm learning all the basics.

And thanks to all who posted suggestions here.  I'll be trying them and posting a reply with the results next week.

0 Kudos
Message 7 of 15
(6,926 Views)

Here are a couple of screenshots.  First is the registery, and second is a copy past of the command I used to run RegisterAddon.exe.  I ran cmd.exe in Admin mode.  From what I can tell, I did everything correctly.

Also, I'm running LV2012 32-bit under Windows 7 32-bit.  Actually, I'm testing it on one of the computers in our NI training center, which has NI's training image installed.  So if you want to reproduce that environment, you can do it pretty easily if you have access to the training image.

Thanks again.

Registry_screenshot.png

CommandLine_screenshot.png

0 Kudos
Message 8 of 15
(6,926 Views)

Hi Paul,

I apologize for the garbled message before, but I was having trouble logging in.

Here are three things that come to mind which might be causing RegisterAddon to fail here:

1. I think the path after the -l parameter to the library has to be relative to the <LabVIEW> directory.

2. RegisterAddon might be getting only part of the path due to white spaces in the folder names if the path is not enclosed in double quotes.

3. If fixing the above two don't work, could you please check if (or attach a screenshot of) the collapsed registry keys under LabVIEW (i.e. 10.0 and 11.0) are empty or have values underneath?

Hope this helps!

-Sumedha

Message was edited by: Sumedha

Sumedha Ganjoo | LabVIEW R&D
0 Kudos
Message 9 of 15
(6,926 Views)

Thank you for the suggestions, Sumedha.

I first tried placing the path to the LVLIB in double quotes.  I got the same result as last time, so I replaced the direct path (C:\ etc.) with a relative path (..\..\ etc.).  THat also gave me the same result.  (I also double-checked that my relative path was correct by copying a file.)

One question: I assume "<LabVIEW>" generically refers to the LabVIEW directory name for whatever version is being used?  So in my case I substituted "LabVIEW 2012" for "<LabVIEW>"  Just want to make sure I've got that syntax correct.

Below I am adding a new screenshot of the registry.  There's just the FPGA stuff for LV2010 and LV2011.  Thanks again for the assistance.

.

Registry_screenshot_2.png

0 Kudos
Message 10 of 15
(6,926 Views)