How to protect a software

I need to put a protection in a software:
-the program can't be used more than 3 times at he same time
-the program can't be transferable to an another computer
-the program can be used in trial, but can't be reinstalled to be used again.
Who is Participating?
There is never a fail-proof way to protect software.

There is always a lot of discussion about copy protection software vs. hardware.  Take a look at this current thread about the problems with a software protect scheme..

As far as a hardware version goes, take a look at Aladdin's hardlock with memory.  It comes with 128 bytes of memory on a 'dongle' that you attach to the back of a user's parallel port.  96 bytes of memory is read only at the user's site and read/write with their special board that they supply you.  The starter kit is either 99 or 199, I can't remember.  The last 32 bytes are read/write either by the user or by the supplier.  They also have a network version as well.

> The program can't be used more than 3 times at he same time

I don't understand this.  I am assuming that you're trying to prohibit a user from using the program more than three times and then the trial will stop.  You can use the 32 byte area to store how many times the program is run.  Everytime, increment a byte.  Inside of the 96 byte section, store the number of times that you allow the user to use the lock.

> the program can't be transferable to an another computer
> the program can be used in trial, but can't be reinstalled to be used again

In the installation program, check a certain byte in the 32 byte area.  If the byte is set, then abort installation.  If the byte isn't set, then set it and continue the installation.  This prohibits installing on more than one.

Using the 'clicking' method of counting the number of usages should be clean enough to ignore the installing to more than one computer problem.

You can also put the date in the 96 character section and stop usage once the date is passed.  Always make sure to set a byte in the 32 byte section if the date is passed to prohibit the user from moving the date back later.

Aladdin does have quite a few more ideas than I can give you.  Check them out!


smaugwarAuthor Commented:
what technique can I Use?
smaugwar, you have to define your needs more clearly.  First consider:

* Do you want an "unbreakable" protection?
If so, there is nothing you or I or anybody else on EE can write that will withstand the efforts of a capable and determined cracker for more than several hours at the most.  Your only choice is purchasing a commercial protection package that is known to be secure.  The only one I know of that hasn't been cracked yet is "ziplock".  If you wan't to add hardware protection (i.e., a dongle) please remember that many of the hardware protection  methods can be (and have been) bypassed by crackers.

* Do you want a "basic" protection designed to keep non-crackers honest?
If so, we can probably help you with ideas.

>> -the program can't be used more than 3 times at he same time
I assume you mean a server installation.  In that case you can create a "counter" in a memory-mapped file in the installation directory, on the server.  Program invocation increments the counter and program exit decrements it.

>> -the program can't be transferable to an another computer
There is one unique ID of a machine: it's network card's MAC address.  Unfortunately, not every machine has a network card...  Pseudo-unique IDs include: hard drive volume serial numbers, BIOS checksums, etc.  You can provide an "activation key" that is a function of one (or more) of the above.  WARNING: If the user upgrades the hardware (or changes BIOS settings) he/she will be really pissed off because your software will stop working.

>> -the program can be used in trial, but can't be reinstalled to be used again.
Save information in some obscure keys in the registry.

Another option is to use LSAPI.  Check your compiler's on-line docs.
Quote: "Software metering and license-tracking technology are available to Windows applications running on Microsoft® Windows® 95 and Windows NT® if they make calls to the License Service Application Programming Interface (LSAPI) version 1.10, a standard set of seven functions that provides licensing services. The LSAPI has been jointly developed with the cooperation, input, and support from a number of companies and associations."
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I agree with everyone else there is no 100% secure way to protect your program. But I also dont recommend you use a dongle. Most dongles have been cracked, and are a favourite target for hackers. A quick search of the net will yield several programs. They are also quite fiddley and sometimes can cause problems such as printing.  Questions similar to your one seem to get ask quite alot at EE, but so far I havent seen a satafactory answer

A better question to look at is

Its quite a long thread but form it you will be able to see that almost every avenue has been unsuccessfully explored. In your position I would do it myself. There are several insecure ways of doing it. A lot of companies  take to 2-3 "unique"  peices of system info, Say the MAC address of ethernet card,  Disc Volume number and prehaps some registry entries, encrypt them and use this a key to their software. Not very safe, but easy to maintain. I can only suggest you do the same.

As I mentioned above, ZIPLOCK has not been cracked.
Im afraid there are alot of cracks for ziplocked software, just have a look on asta-la-vista, sorry.

I think your info is outdated.  The new ziplock gives crackers tough time.


Unfortunately, messages from  PC98 members stating that ziplock is yet uncracked were posted with X-no-archive so I cannot provide a reference.
smaugwarAuthor Commented:
I had an idea for the evaluation and I want to know how I can do that.
I know that X-com3 can't be copied to an another cd 'cause of a file error, made by the conceptor.
My idea was that. If I can create a file with the instalation, who had an error on it, who cause the deleting impossible, but the creation of the file be read, if can read it and compare with the date of the day, who can I cause this problem intentionaly?
Won't work.  Protection by media errors was cracked in the 80's.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.