Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone...

I want to

1. make an installer
2. make it so that if it will be installed on one computer, anyone trying to run the same files on another computer will fail.

I'm using VS 2010 , I have done the installer part, but I'm not sure how to do the "security" part. I have already fetch the MAC Address but don't know how to use that address to prevent the installation on another computer .

Please help...

Thank You
Posted
Updated 11-Oct-12 0:58am
v2

In pure installer code, this is doomed to fail. The installer code would have to change with each installation. If it was copied prior to installation, the copy would work like the original.

You will have to create some handling around your code.

An example:
You form a hash of CPU serial number, your mentioned MAC address, some HDD-identifying whatever. Make the user post this to you. Process it in some way, send the result back to the user. He has to type your response into a form that the setup is presenting to him. Setup then compares your response to the hardware that it finds and if it matches, installation continues.

Users will hate that procedure. (What if you're unreachable in 18 months?)
Even though you can automate the response generation, you will hate having to deal with the issues evolving.
Someone will find a way around it, I'm sure. (Can you fake any CPU S/N into a virtual machine?)

Edit: And there is no such thing as "the" MAC address of a computer. I has as many MAC addresses as it has Network Interface Cards.
 
Share this answer
 
v2
As per my understanding of your requirements..
You want to create a installer which installs on only one machine.

1) See every time you need to create a installer for new machine, At that time change the version of your installer so it will generate new product key for that version.

2) Every time when user installs the installer you need to generate a unique key from the hardware of user(e.g. MAC key + User Name).

3) Create one web-service which accepts the Unique key of user machine & product key of your installer. It will return the True/False result.

4) Maintain the database which will store your Product code of installer & User's machine key.

5) The Web-service will return True if it don't find a product key of installer's version in the database & insert that Product key & machine key in the Database.

5) It will return False if it finds the product key in the Database so you can abort the installation on that machine.


Note: This solution is not feasible at times & has some flaws. but if you want to stick with your requirements it could give you head start.
 
Share this answer
 
Instead of creating the installer for every user, create a activation key for the machine by getting the unique identification of the machine where the product is to be installed.

Protecting Your Software Using Simple Serial Number/Activation Key Pair[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900