Link to home
Start Free TrialLog in
Avatar of sime
sime

asked on

Protecting programs from piracy

How can I get the hard disk's serial number in order to protect my program from running elsewhere that in that particular hard disk ?
ASKER CERTIFIED SOLUTION
Avatar of jackb022197
jackb022197

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mheacock
mheacock

If you can set the serial number...what would prevent some
other program from doing the same thing, thus rendering
your program inoperable...thus pissing off your customer??

Reading drive serial numbers is just a bad idea.  Think about
it?  If it was a good idea, every major piece of software
would be doing it.

Also, what's to stop someone from just pirating your setup
disk??  Your setup doesn't know, ahead of time, the serial
number of the drive it is going to be installed to.
What kind of software are you writing that you think it will
be so rampantly pirated?

If you are writing shareware or something, a better bet might
be to just supply demos that are time-stamped and will not
allows installs after an initial one has expired.

If you want some tips on how to do this effectively, I can
supply as an answer if you don't like the answer already given.
And what if you change the system date? You could still be using the program.
I've already taken into account changing the system date...
system date changes are a really simple problem to solve.

The simplest, though not the only solution, is to hard code
a date into your program that it cannot run before.  If
you created your program July 1996...you certainly would
not allow it to run with a system date of June 1996 or earlier.

There are a lot of other little things that you can do to
make it extremely difficult for anyone to try and circumvent
time-stamping.  It will always be possible to circumvent,
but if you make it a pain in the ass to do so, most folks will
stop bothering to try.

And you always have human error to rely on...the moment someone
forgets to set back the clock and run your program, it'll
make it very difficult for them to re-run it once it has
expired.