Hi Jeyanth.s,
Based on my understanding, the main issue is how to create a license file for a machine and make sure this license can only be used on this machine. I have one idea to do this, you can follow the steps below to create a license:
How to create a license:
1. Get some information about one machine which can be used to identify this machine. For example, we can use the Mac address.
2. Use the machine information to generate the license data.
3. Use some encrypt algorithm to encrypt the license data and save the encrypt data to a license file.
4. Sell this license file to the customer.
How to check a license:
1. Create a library and add a custom Installer class.
2. Override the Install method and check whether a license file is located on this machine.
3. Load the data from the license file and decrypt data.
4. Get the machine information from the decrypt data.
5. Get the machine information of this machine and compare it to the information got from the decrypt data.
6. If the information is in accordance, continue the setup process. Otherwise, roll back.
The thread below shows how to get the Mac address with C#:
http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/1344dad4-dffe-486c-bf30-1b75d21fc9ba.
You can follow this link to convert code from C# to VB.Net:
http://www.developerfusion.com/tools/convert/csharp-to-vb/.
The document below is about RSA Private Key Encryption:
http://www.codeproject.com/KB/security/PrivateEncryption.aspx.
We can use the private key to encrypt the license data when we create a license file and use the public key to decrypt in the custom action.
This is a walkthrough about create a custom action:
http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx.
Let me know if this does not help.
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.