Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a .net windows form application that I want to restrict from being duplicated. I want this application to be portable, so I would like to allow it to be moved. How would I be able to do this without managing it through a remote server?

share|improve this question
What do you mean by 'duplicated'? Do you mean protected from being copied? You cant. – GrandmasterB Jun 23 '12 at 4:52
Games solve this by having their users logging into the mothership and a given user can only be logged in one place. – user1249 Jun 23 '12 at 9:19
Having it "phone home" is going to be the most reliable way to do this. Otherwise you're stuck with easily breakable schemes or ones that are expensive for you and onerous for end users. Why are you taking remote user management off the table? – jfrankcarr Jun 23 '12 at 13:53
The reason I took remote user management off of the table is because don't want to require them to have an internet connection to use the product. Although it looks like that may be the only way to protect my product while at the same time allow my users to have a portable application. Keep in mind I just want to have some basic protection so basic users don't just start handing out a bunch of copies. – dkroy Jun 23 '12 at 17:56
Though I will allow upvotes to pick the best answer it seems that the best way for me to keep my users happy, and at the same time my software from being too easily distributed it is to allow it. I am going to allow that to happen, and just rip out the advanced functionality and call them plugins, which the users can ultimately pay for. Since most of those plugins use the internet for their functionality it is those that I will track usage for and protect. – dkroy Jun 23 '12 at 18:15
up vote 7 down vote accepted

That's a pretty elusive target.

The tighter you bind your application to a particular location, the less happy your customers will be with you whenever the inevitable computer maintenance comes up. And it comes up quite frequently.

One trick is to bind to particulars within the hardware of the device. MS Windows XP and additional MS products are a good case study on this approach. This usually requires a phone home or call to somewhere approach.

Another method is to have the application phone home with the registration code to receive an unlock signal. Win 7 and Win 2008 enterprise licensing use this approach. Quite a few other applications do this as well. Again, generally, you need a remote server available to be called. MS allows enterprises to set up their own license servers though.

Dongles are yet another method. They're kind of expensive to get started with, and they don't slow down the true crackers (or is that crackerz?).

You could always time-bound your activation codes, say for 24 hours or a week. After the time period expires, a new code has to be issued.

At some point, you need to trust that your users aren't going to rip you off. If you think about it, they're trusting you to give them a quality product, so it's not unfair for some of that trust to be reciprocated.

share|improve this answer

While this is not a solution, it may help shed some light on some of the threats and your options. As @GlenH7 says "That's a pretty elusive target.". I need to mention here that I am not an excerpt in this field, so take the advice with a grain of salt!

You could use the technique of binding your software key to the Hard Drive Volume Serial Number. The downsides are:

1 - If your user re-formats the disk, they will probably need to contact you again unless they use the same old serial number.

2 - There are programs that allows for Hard disk serial number change. So if your user knows about this, he can distribute the software and use this program to fool your program. To prevent this, you may need more information about the hardware to incorporate it in your code. You may then want to use a utility to provide such information such as CPUID-PRO.

The other threat is the the end-user may be able to reverse engineer your code from assemblies and get your db schema as well. I am not sure there are easy and effective ways against that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.