How to make my program not running on other computers?

I have a task and it has (among others) two requirements:

  • make installer
  • make sure that if it is installed on one computer, anyone who tries to run the same files on another computer will fail.

I am using VS9 (2008) express, I think I can do the installer part, but I'm not sure how to make the "security" part. I don’t need to hack security hard, just a dumb state that will make most users copy files to another computer. (Like checking the MAC address).

Any ideas?

EDIT:
I would like to check the MAC address, but I want the program to be completed during installation. This means that after installation, I can not move the program to another machine. It also does not have to be a very smart or difficult state, just minimal. I just don’t know how to do this during installation.

EDIT:
I am sad that I do not have a complete VS, then I could do it easily.

+4
source share
9 answers

If you are looking for some way to mark the first computer as an “authorized” computer, you will need an external service with which you can request permission to start.

The first person who asks for permission will be allowed, the rest will be prevented.

You will also need to somehow determine the specific instance of your application that will be different for each installation.

If your application needs to be authorized for the machine, you will need to calculate some fingerprint for the machine, which it can use every time (for example, through the settings).

[edit] This approach is useful when you are also worried about copies of redistributable installers. You indicated that it is normal to install on multiple machines, so in this case the MasterMind approach is superior. It will work and does not require a third-party server.

[Edit 2] If you are looking for information on how to create a custom installer, try here

+8
source

First of all, come up with some function to create a unique PC signature, such as Windows for activation.

Your installer will create this signature and write it to a local file (better encrypted). You can create a simple console executable to create this file and include this executable in your installer package by setting it to work silently after a successful installation.

Your program at startup will again create a signature using the same algorithm and compare it with the one that was created during installation. If the new signature is different from the original or the signature file is missing, exit it without loading the user interface.

ADDED: If it’s not very difficult for you, you can simply select several unique values, for example, the MAC address that you offered, perhaps the serial number of the hard drive, the serial number of the motherboard, combine them into one line and generate a hash from it.

This approach will allow you to run an unlimited number of copies (but each installation will work only on one machine where it was installed). If you adhere to identification using hardware (or the product key of the operating system OS), then the application can run during various OS installations on the same computer.

However, this strategy implies that you control all installations (or execute them yourself) or absolutely trust your client not to install additional copies elsewhere or distribute your installer. If you need such protection, then you should consider activating the product. It can be quite difficult if you do it yourself. However, there are third-party products that will help you. Some offer product activation services: Google: activation service

+6
source

Once you have a decent fingerprint, everything else is easy. Personally, I would take something like the MAC address and Windows product identifier (in HKLM \ Software \ Microsoft \ Windows \ CurrentVersion \ ProductId) and use the hashing algorithm to get something reasonably implicit.

edit:

Here is a question that shows you how to get your MAC address as a string: Read the MAC address from a network adapter in .NET

Then take the Windows product identifier (if it does not have a network adapter) from the specified registry key. Combine both lines and do GetHashCode () (or use your favorite hash algorithm) as a result. This is an easy way to get the UID for the computer.

Write the hash to a file or to a registry entry when your installer executes, and verify it when you run your program.

+5
source

Consider using two or more values ​​that potentially identify a machine, for example

  • Windows Product Code
  • C drive volume serial number:
  • Ethernet Interface MAC Address

And if only one of these changes, but the others are the same, update this value in the registry and continue to work normally. Hard disks are replaced (regularly), Windows is updated (sometimes), Ethernet adapters are replaced (rarely, but this happens). This can be very frustrating when older software stops working because of this.

+2
source

A low minimum answer, provided that the only requirement here is that the software must run if it is installed through the installer and will not work when copying to another computer:

Write a simple key in the registry. Most likely, your product version number, if they copy a newer version to a computer, it has a different number for verification.

In your software, just make sure that this registry value exists.

For packaging installations, I like to use NSIS , which has easy ways to write to the registry.

+2
source

I like the idea of ​​checking the MAC address.

I also saw product / online activation key combinations in which you enter the product key, and the software contacts the web service that registers the product key and # installation.

0
source

This is not the safest option or anything else, but you said that he does not need to be smart ...

During installation, you can set the program variable as the name of the machine (or hash it if you want).

Like:

myProgram.Properties.Settings.Default.Machine = System.Environment.MachineName; myProgram.Properties.Settings.Default.Save(); 

then check that at startup:

 if (System.Environment.MachineName != myProgram.Properties.Settings.Default.Machine) { MessageBox.Show("Can't run on this computer"); this.Close(); } 
0
source

For the installer to work on only one computer, you will need to build it for the target machine. I don’t think it would be possible to make an installer who suggests the first machine that he sees is mom and is attached to life.

-1
source

-1 to bind to an obsolete license restriction policy, which is bad practice in general. Hardware keys and “device discovery” are SO 1990.

People own more than one computer. They are buying new computers. They are upgrading their computers. Computers break down, which leads to the replacement of motherboards or network cards.

All this, given your design, will lead to honest customers being blocked for what they paid for, and you will have to call you to support “reset” their activation.

And every time you do this, your overhead will increase, most likely more than the actual cost of the license.

I do not suggest you give up and just send the application to a torrent, but you should think more creatively about how to allow customers the freedom to use what they paid for, maintain a low support cost and discourage pirates.

One solution for creativity would be to cache user settings on your server using their serial number and synchronize them every time the application starts and connects to the network.

This will allow the user to install the application, say, both on a laptop and on the desktop, and will actually become additional for clients, since their settings are synchronized between devices.

But it actively discourages users from sharing their license key, as this means that they will share their settings with each pirate user or that they will have to remember to stay disconnected from Interwebs when they open or close the application.

-2
source

All Articles