I only sell a few licenses of my software and I am worried when I sell them to the same company that they will all just share the CD around the office. Is there a simple way to keep this from happening? I don't need it to be hacker proof, and I don't mind if it takes me sending them a license key for each time they buy a new version. Any ideas? Nothing too fancy please. Thanks!
See How do I protect Python code? The answer's essentially the same for .Net.
I've been looking at .NET Reactor or IntelliLock from Eziriz for same purpose:
Just focus on writing good software. Honest people will reward you for it and pirates will always be pirates. Don't waste too much time on protection scheme because it will be broken.
The ideas of "keep this from happening" and "nothing too fancy please" are pretty mutually exclusive.
You could use a hardware dongle or software activation but those are complicated.
You could make different versions of the executables to accept different serial numbers but this sounds like a real pain as well.
The more copy protection and DRM you put on it the less likely it will get stolen but the more hassle you will entail.
I'd look into a different alternative like site or bulk licensing. Or taking interests in the companies that buy it (your post makes it sound like this is a "I have few customers for it" sort of a product) and make sure that they're on the level, strict about licensing, etc.
Also if your product is server-based and requires development, you can do something like let it be installed freely on XP or Vista machines and require licensing on Windows Server machines - you don't want to make it difficult to develop for the software, you just want to enforce licensing when it gets deployed.
MS has something just for what you're talking about here: http://www.microsoft.com/slps/
Go the extra step and obfuscate your code. I like smartassembly but there are lots of alternatives. http://www.smartassembly.com/
NOTE I wouldn't personally go down this route, but you could do it if you wanted... It's just a thought
- Get the serial number of the first hard disk in the machine,
- Store the HDD serial and licence key in a web service data store somewhere
- check the licence against the serial on each startup. Exit if they don't match
As I say, I don't think I'd go down this route because of the admin overhead, and the ease of defeating the mechanism, but for a simple check it's probably worth thinking about...
For HDD serial grabbing, try here
Here's a very simple solution: have your app write a random key into the registry somewhere inconspicuous (under your app's key is polite, but don't call it "key" or "product id") the first time it's run. I like using a GUID for this key.
Each time your app starts, it reads this key and then also checks for a matching unlock code (which isn't there initially, of course). If the code is missing or doesn't match, you show a box to the user requiring them to enter the code (also display the key which they send to you to get the code).
You can use a simple Tom Mix decoder ring-style algorithm for matching keys to unlock codes (crackers can see what your app is doing anyway, so anything more isn't worth the trouble). If the code they enter works, you save it in the registry also and then they never see the message again.
This means you have to manage each individual user via email, but in practice this is a minor problem, and the overall setup does require customers to keep in touch with you periodically. Another advantage to this approach is that you can freely distribute your installation disks to customers (and even encourage them to make copies).
Edit: in Vista this could be a bad idea, because of permissions issues with the registry. I would change that part to whatever the recommended approach is now for Vista. On the other hand, it's not necessarily bad to only write the key and code to the current user part of the registry - that way other people can't use your software on that machine.
The best way I know of to keep people from copying your software is to spend all your time worrying about keeping people from copying your software, thus ensuring it won't be good enough for anyone to care about copying it.
I can see doing something simple to keep the honest people honest, but beyond that it is a losing battle.
I think you need to implement come basic security but you can't stop everyone, and why put in the effort to prevent people who are already so committed to stealing your software?
So I agree with going for a simple solution, I never implemented such a feature but could you use server activation? They need a licence for the software to be activated and if you notice a certain serial is being over used (say, more than 5-10 machines) you can block any future activations?
As others have said, you can't stop privacy but you could help reduce it slightly.
When licensing and copy-protecting your software, keep these things in mind:
- Simple hassle free and easy to use scheme to keep honest people honest. The ones who will pirate your software no matter what were most probably not going to buy your software anyway.
- Use various methods to cause the hacker to lose interest in your software or not make it worthwhile for him/her. See 8 Ways To Make Your Software Hacker-Proof and Crack-Proof for some interesting techniques.
Microsoft has discontinued SLPS; I suggest you take a look at a third-party product like the OffByZero Cobalt software licensing solution for .NET.
Cobalt will do exactly what you want: by default licensing is per-machine, and licenses are limited to a specific number of machines. You can check out a short screencast to see how easy it is to integrate Cobalt with your software.
Bear in mind that it is impossible to completely prevent the unauthorized use of software (as I think you're implying when you say "keep this from happening"). The aim of any licensing system should be to raise the bar sufficiently high that it is easier to purchase your software than to pirate it.
Obligatory disclaimer: OffByZero Cobalt is produced by a company I co-founded.