How can I restrict my .net based windows application to run only when the original CD is present in CD drive. Also the user shouldn't be allowed to create copy of CD.
views:
252answers:
6Have you read http://en.wikipedia.org/wiki/Copy_protection#Copy_protection_for_computer_software ?
If you can assume that your customers have access to the internet once your app is installed you can make sort of a licensing-server/webservice solution. Then you can do a serialnumber approach which checks to your webservice for validity. (like the Ms-Windows activation)
You can use the mac-address of the network-card for a hardware ID to base your activation upon.
With far more trouble (for everyone involved) than it is worth in most cases.
You can't do this -- your software might be running in a virtual machine with a virtual CD drive and people could configure those to be indistinguishable from the real thing.
I believe some game companies tried a scheme where they put physical defects on their CDs, and the games would then only play if it found those defects. The idea being that naive program wont be able to copy the disc because of the unreadable parts, or that a copy made would not have the same physical defects as the original. However, unless you have access to such equipment, I don't think you can do this.
You could do it the tried and tested way and use cd-keys, use your imagination for the implementation.
Restricting being able to run the application when the CD drive is just a matter of keeping some files on the CD that the application needs to run, so you'll get an error if those files aren't found.
Copy protection on on the CD isn't something I know how to help you with. I agree with other posters though. It's the internet age, CD's are dieing, if you want to put protection on your software, you need to implement a solution that will work with a downloaded app.
If you're going to have your discs produced in any volume by an optical media manufacturer, then it's going to be easier to use a third-party protection from someone like Macrovision.
But there's really not much point to it. You can only prevent casual copying this way. The people who take intellectual property rights seriously aren't going to be copying your work anyway. And the people who don't will crack it and copy it despite the money/effort you put into protecting it.
It would be much better to price the software fairly and make an appeal to your customers that they are better served to purchase and register the software, and then you provide them with excellent customer support that makes them feel good about their decision to buy it rather than steal it.