Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# .NET4 setup
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 10-Oct-12 22:20pm
Edited 11-Oct-12 0:58am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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[^]
  Permalink  
v2

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 309
1 Richard MacCutchan 295
2 OriginalGriff 270
3 Sharmanuj 146
4 Magic Wonder 129
0 Sergey Alexandrovich Kryukov 5,969
1 OriginalGriff 5,005
2 CPallini 2,473
3 Richard MacCutchan 1,547
4 Abhinav S 1,507


Advertise | Privacy | Mobile
Web01 | 2.8.140814.1 | Last Updated 11 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100