What is the best way to make an installation keycode that would get activated by our web server?

What is the best way to make an installation keycode that would get activated by our web server?
LVL 3
jdraggiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The_BiochemistCommented:
there are essentialy 3 steps to restricting users from deploying multiple versions of software.

1) Give each individual deployment a specific and unique key say a random 10 digit number for instance
2) Find something specific about the computer it is being loaded onto e.g. the windows serial number from the registry and the machine serial number using system.management ( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemManagement.asp ).
3) store the unique key to the computer information in your database and the next time you have a request to activate the key with different computer information it is likely to be a fraudulent attempt.

I would add some code to the installer that checks a web service to see if the unique key is already entered in your database and if so check the stored computer information against the computer information for the current installation... if they match or the unique key is not present in the database then the installation can continue else if the key is present with different computer information then you can kill the installation before it gets going.

If the installation succeeds then redirect the user to your website to register their details against the unique key in the database so you can easily track who is lending their copy of your software out and take appropriate action!

Just ask if you want more detailed information... the question sounded like a 'for information only' as oposed to requiring any real code etc...

P.S. there are usb pens and otherf similar devices which can add hardware peotection to you app, these are effective and generally easier to administer than websites, databases and web services! e.g. http://www.keylok.com/order_kit_2.shtml which has a $19.99 trial version!

Happy coding!
jdraggiAuthor Commented:
Thanks for your reply.

I would like to stay away from the Dongle method or any other method that requires that I pay or work with a thrid party product.

It seems like the sky is the limit and what I am really trying to accomplish is the 'common' computer user giving this software to the local computer guy and having him find a work-around to install it at their buddy's location.

It's not going to be a large software distribution only 200 to 250 sites with a yearly maintenance contract.  So I really don't want to go into major coding either.  Just avoid 98% of the most common methods of piracy.

I like your idea of connecting the install to the system GUID.

Can you supply any code vb.net, C#.net, .net, or other code that would grab that System ID based on the link that you gave me?

Thanks,
--John
The_BiochemistCommented:
This basically explains how to get the volume (hard drive) serial number, the CPU ID and also the MAC address of the primary network adapter. These can then be bolted together to give a very unique identifier. I would probablu ignore the MAC address part as these often need to be cloned to fit in with ISPs WANs but a string containing the volume serial and CPU ID would ensure that the software is being used on the same hard drive and with the same CPU... so essentially trhe same PC.

The site is as follows (appologies for the C# code... couldn't find much for VB):

http://www.eggheadcafe.com/articles/20030511.asp

Hope it helps...

Hapy coding!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jdraggiAuthor Commented:
Perfect!  Thanks!

The downloaded code compiled and worked great!

Thanks again,
John
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.