07-03-2008 08:12 AM
07-03-2008 09:08 AM
07-03-2008 09:18 AM - edited 07-03-2008 09:22 AM
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.
07-03-2008 09:32 AM
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.
07-04-2008 02:24 AM
07-07-2008 08:24 AM
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