LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I generate License key for installer made using Application Builder of LabVIEW

One possibility is to have the installer run a simple program after the installer runs (Use the Advanced tab on the installer build page.)  This program can ask for the user 'key' and using the SID generate a unique serial number that is stored in the registry (or elsewhere).  Your main program could then check this key and determine if it is to run or not.
 
Not a perfect solution, but it is a bit better than nothing.
Jon D
Certified LabVIEW Developer.
Message 11 of 16
(2,425 Views)
dear Jon,
   thanks for the reply. If once the application is build with a key using advanced tab in installer build page, The same application with the same key can be loaded on to many computers. How to avoid this? Any one can take the application and key that is once generated, and keep distributing the application without any problem. How to get over this type of problem?
 
nabhi

0 Kudos
Message 12 of 16
(2,413 Views)


nabhi wrote:
dear Jon,
   thanks for the reply. If once the application is build with a key using advanced tab in installer build page, The same application with the same key can be loaded on to many computers. How to avoid this? Any one can take the application and key that is once generated, and keep distributing the application without any problem. How to get over this type of problem?
 
nabhi




You can't!  Think of how Microsoft handles it for Windows, or National Instruments handles it for LabVIEW.  They have it built into their licensing scheme that the application goes out on the web and to their licensing server to get a key.  They maintain a large database of what serial numbers are used where and how often.  Software can be copied.  It can't control how many copies are made or how many times it is installed.  It is only the link to the central license key database that determines whether the application can be completely installed and run.

Without designing and deploying a complicated license server, the closest you could come is having a scheme where the person e-mails you and you supply them the license key be e-mail for them to enter.  Like you said, that could be copied.  So it has to be something that is linked to something that can't be copied like the serial number of the CPU.  The application would run, it would provide you the serial number in some coded form.  A complicated security algorithm would provide a key code based on that which you would e-mail back to the customer for them to enter.  The application would only run completely if the serial number of the CPU matches the provided key code by way of the same complicated security algorithm which you would have embedded in your application.



Message Edited by Ravens Fan on 07-03-2008 10:22 AM
0 Kudos
Message 13 of 16
(2,409 Views)


nabhi wrote:
dear Jon,
   thanks for the reply. If once the application is build with a key using advanced tab in installer build page, The same application with the same key can be loaded on to many computers. How to avoid this? Any one can take the application and key that is once generated, and keep distributing the application without any problem. How to get over this type of problem?
 
nabhi




Ok, this is going to be more specific to windows based machines but can be modified to other OS's I'm sure.

How the idea works is that the installer calls an application after the install (lets call it keygen, this application might even be just another LabVIEW built exe.)   Keygen will ask the user for their user 'key' (Let us assume a 15 character alphanumeric string.), keygen will then use the computers SID, the 'key' and another internal string (Let us call it 'keyB') to generate an encrypted string.  This string is stored in the windows registry (HKEY_LOCAL_MACHINE/SOFTWARE/MyCompany/MyProgram/Register for instance.)  When the program is started, it will read that key, and use the 'keyB' string to decrypt it.  If the SID and a valid user 'key' is recovered from the decrypt, it will run, and if a valid SID and user 'key' are not recovered, the program will exit.

 

Some caveats, I'm not sure of the API calls to obtain the systems SID value.  Also, this solution will not stop someone who is savvy enough to know how to either decrypt such keys or set the systems SID manually.  Also the encryption algorithm would need to be tailored to your specific needs.

Jon D
Certified LabVIEW Developer.
0 Kudos
Message 14 of 16
(2,400 Views)
Thanks Jon and Raven Fan,
      Yes, exactly this is what to wish to do. One can make some sort of encryption using labview. But how to read the serial number of CPU? or hard disk ID or any other hardware ID using labview?
      How one can store these keys in registry using labview? I may be using in my application the compact field point modules. Is there a possibility of reading CFP model serial number and generate some sort of encrypted key? as you said, user can request a key by giving some details of his / her computer or other hardware, and they i can generate a key to them.
      There is other question related to this. Somewhere on discussion form, there was a code written for CVI for reading hardware serial number, i am not able to recal that. Suppose that C code written for CVI, can be converted to an application that can be called in labview? if so then we can think of using some sort of serial number reading mechanism.
      I did not come accross anywhere regarding how to read the MAC number, cpu serial number or any other hardware serial number.
I sincerely thank for your kind effort to educate me.
Nabhi
0 Kudos
Message 15 of 16
(2,378 Views)


nabhi wrote:
Thanks Jon and Raven Fan,
      Yes, exactly this is what to wish to do. One can make some sort of encryption using labview. But how to read the serial number of CPU? or hard disk ID or any other hardware ID using labview?
      How one can store these keys in registry using labview? I may be using in my application the compact field point modules. Is there a possibility of reading CFP model serial number and generate some sort of encrypted key? as you said, user can request a key by giving some details of his / her computer or other hardware, and they i can generate a key to them.
      There is other question related to this. Somewhere on discussion form, there was a code written for CVI for reading hardware serial number, i am not able to recal that. Suppose that C code written for CVI, can be converted to an application that can be called in labview? if so then we can think of using some sort of serial number reading mechanism.
      I did not come accross anywhere regarding how to read the MAC number, cpu serial number or any other hardware serial number.
I sincerely thank for your kind effort to educate me.
Nabhi


To store and read the registry keys, one needs to use the VI's in Connectivity->Windows Registry Access VI's menu.
If the CVI code was basic enough, you should be able to use a Call Interface Node or Call Library Node VI to access the CVI c code.  (Some care needs to be taken there, read the help on those two nodes)
I'm not really familiar with Compact Field Point, so can't help you there, sorry.
 
Hmm, looking into things there really isn't a good way to obtain a simple serial number for the machine.  You might want to look into the WMI system calls and use the CIN and CLN VI's I mentioned above to obtain certain hardware serial numbers, but those can be limited in use.  Do a search for WMI API for more information.
Sorry I couldn't help you more.
Jon D
Certified LabVIEW Developer.
0 Kudos
Message 16 of 16
(2,349 Views)