View Full Version : How do I protect my cd from being copied?
Training
05-24-2006, 04:57 AM
I have just finished creating a training programme using AMS6 and want to find out whether i can stop someone from copying it. Can anyone help me?
rhosk
05-24-2006, 05:56 AM
I don't think it's possible, Training.
Hi Training. This question seems to be a popular one around here. Several members have developed ways of copy protecting an AMS app when distributing on thumbdrive. Here is Robo's example:
http://www.indigorose.com/forums/showthread.php?t=9484&highlight=thumbdrive
If copy protection is important enough to you and the finanacial/user-experience costs are acceptable, you may want to consider distributing on that media type instead.
For many of us this is not an option and a simple solution to copy-protecting CDs has been elusive in this forum. There are several very good products available to handle this task but they usually involve the purchase of specialize hardware and/or software for your burning/replication process. For smaller distributions these solutions are often cost prohibitive.
http://en.wikipedia.org/wiki/CD_copy_protection
So let's discuss what would need to happen to accomplish your goal. Maybe with some feedback from other members we can come up with an "acceptable" level of protection.
In order to determine if you app has been copied, it must understand where it is allowed to run from and be able to uniquely identify whether it is launching from that location at run-time (eg. "I am on my CD" or "I am not on my CD").
Preventing your app from running when a user simply copies it to their PC is easy. Run a series of checks before your first screen loads to determine if you app is running from a the appropriate drive type. You could also check for expected folder structure in the root of the drive. If you find other unexpected folders around your parent folder, exit the application. The problem with this approach is that the user could easily copy your app to another CD or the root of another partition and run it with no problems.
The real problem that needs to be solved is how do you uniquely identify the CD your app is on?
One way to accomplish this is to:
i) Measure the capacity in bits of the CD (which should vary slightly from disc to disc)
ii) Measure the available space in bits on the CD once your app is installed (which you can also vary if you include a randomly sized dummy file)
If you can include a hash of this info in each burn of your app along with the scripting to validate at run-time, your app should not run when copied to any other disc except in the unlikely coincidence that two discs are the exact same size. My understanding is that this approach can be circumvented by more advanced users with time on their hands, but will likely roadblock your casual CD copier.
There are two additional hurdles to using this approach:
1) You would need to write an app to calculate the values mentioned above and create the dummy file for the specific target CD before burning (this is doable)
2) You need a mechanism to get the bit sizes at run-time. There current AMS release includes actions to get the sizes mentioned but they return the values in MBs. This can be converted to a more granular measure (preferrably bits) but I am uncertain if the action does any rounding in its process.
Hope this leads serves as a thought starter. There are many far brighter member kicking around in here that I'm sure can help refine this approach.
goukilord10
05-26-2006, 05:17 PM
im developping a CP too using AMS and some DLLs
but anyone know how can i get the free space of a drive in bits or bytes ?
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.