Click here to Skip to main content
15,917,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i write a c# program to copy protect a file....???
Posted
Comments
CHill60 16-Jan-13 6:59am    
Stopping a file from being copied is nigh on impossible, especially as you imply it will be on a cd-rom. Even if you install some security software on autorun onto the CD it can be circumvented.
Why do you want to stop the file from being copied? Could you encrypt the file in some way so that it is meaningless without your software to view it for example
prajwal rao 16-Jan-13 7:04am    
sir i had written code for burning files to cd.. and now i want to protect it from copying....???

1 solution

Copy protection is a thorny subject at the best of times.

You can't "copy protect a file" on any media, especially not on a CD where no information can be written to indicate it has been read. Think about it: a copy operation is a read, followed by a write to a different location. If you can't indicate that the file has already been read, you can't tell the difference between a legitimate read operation on the file, and read for copy operation.

Protecting the CD is difficult, and generally useless as most copy protected CD can be copied as an ISO image by the various "backup" tools out there.

You are much better off looking at protecting your users access by online methods in much the same way as MS does - a key value which has to be verified on line - by even then if the product is used enough, the hackers will easily circumvent it. Look at the big companies out there: Adobe Photoshop is expensive, and they spend a lot protecting it, but the "cracked" version is frequently available on torrent sites the same day the product is officially released...

Unless you have a mass-market product with a very high value, it generally isn't worth using any form of copy protection that takes you more than a day - because you will not loose that amount in revenue anyway, and will likely annoy the heck out of your legitimate users should it ever go wrong.
 
Share this answer
 
Comments
prajwal rao 16-Jan-13 7:19am    
sir if anyone tries to copy then in programming by adding extra bit cant we sole that problem..???
OriginalGriff 16-Jan-13 7:24am    
Adding an extra bit to what? It's a CD - it's a write-once media, you can't change it once it is finished. And if you could, the user could just write it back again...
prajwal rao 16-Jan-13 23:53pm    
if a file has some 30000 bites, and if we divide them into 8 equal parts and writing them in 8 blocks..... and cant we create a program such that if anyone tries to copy that cd rom... those data should be altered...??
OriginalGriff 17-Jan-13 3:46am    
No! :laugh:
If you can read them to use the file, then anyone else can read them in the same way - the hardware of the CD reader does not get told "This is prajwal's program, read the data ok" - it just gets "Read sector 123, frames 17 to 92" and hands back the data. There are various ways to make it difficult to copy a CD (such as deliberate bad sectors and framing errors and so forth) but most of the CD copying programs cope with them pretty easily nowadays.

A couple of questions for you: How much piracy are you expecting? How much are you selling your app for, and at what profit margin? How much does your time cost? How many would-be pirate will buy your product if they can't steal it?

I don't expect you to answer that, but think about it: if your time is worth $10 an hour, and your profit on sales is $10 per unit, then you need to successfully convert one pirate into a customer for each hour you spend on this...without annoying any existing customers. It doesn't take very much effort before it costs more to add anti-piracy than you get back from it, unless you are talking about mass market and 100,000+ unit sales. And if you reach that level, then the "good" pirates will get interested and prove how their "skillz" is "madder" than yours by uploading the cracked version to torrent sites the same day you release it!
prajwal rao 17-Jan-13 4:53am    
well sir i don't want to sold any product....:) am just keen in learning all those things.... and just to pass my vacation am doing all those things...:)

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900