views:

1214

answers:

6

I am developing software in C# for a Windows CE device and I have beta software soon to be released and I want it to die after a certain date so the final release will need to be downloaded.

The user does not have internet access.
I was thinking of using the system date but it can be changed by the user.
I can start a timer or a count of some sort but the user could just reinstall the software.
The user has already paid for the software and the final release does not cost more money, it simply has features that we do not to include in the final release for legal issues.

Anyone have any ideas on the best way to implement something like this?

A: 

See this article for more information.

C. Ross
This article is for software where the user has internet access.
Nick S.
+1  A: 

You could store the counter in a registry, and if they uninstall don't delete the registry key. They could still reinstall the OS, have deleted and reinstalled the registry, but would they go through all that for a program they want to use but not pay for?

To make it more difficult, you could encrypt the counter and then store it, so the user can't find it and change it to a smaller number.

James Black
They can always undo it.
C. Ross
They can, but encrypting makes it harder to change to a known value, and if it is not a reasonable value when decrypted you can just assume that it is expired. :)
James Black
+7  A: 

No matter what you do - people will always be able to hack your software. If you at some point give them the key they will always be able to revert to the state where the key was still valid (for example ghosting). Then you are offline you cant use a outside enviroment automaticly to check for exspireration. The best thing you can do is to store a counter in two different logic places for example in the registry and on a special folder on disk. If only one exist or they dont match, take the most expired one, and save that back to the places.

Jesper Blad Jensen aka. Deldy
+2  A: 

I was thinking of using the system date but it can be changed by the user.

Don't worry about it.

Programmers generally have some mix of three goals when writing software:

  1. Money. You either sell it yourself or write it for someone else in exchange for a paycheck.
  2. Fame/Notoriety. You want people to actually use your software.
  3. Fun. Ideally you also enjoy writing software for it's own sake.

Spending more time trying to restrict who can use your software is not "fun" programming, can only serve to reduce your user base, and I argue in my linked post that it actually reduces the amount of money you can make from the product. In other words, it's completely counter to what you're trying to do.

I will grant that in this specific scenario you may have something. You do have a legitimate interest in expiring beta software, and your platform is susceptible to clock issues. I have an older pocketpc that is always losing it's charge, and whenever that happens the system date is reset to 2002. It happens so often I don't always bother setting the year any more; I just make sure the date is current within the year. But still: don't spend too much time on it.

Joel Coehoorn
+1  A: 

To repeat myself: If the user holds all parts of the software (no internet access), you've lost, period.

You could use the installation date as a cryptographic key to encrypt all data, so tampering will make the data unreadable (keep in mind possible legal implications!), but that only works if your software actually generates meaningful data.

The other workaround is to record the time every time the tool is started and compare it against the last recorded date. If it's backward, then the user has tampered and you can prevent the app from running.

Michael Stum
A: 

Does this really matter? If they've paid for it and it's in their interest to obtain the final release to get the extra features, who is going to try and hack some extra usage of the beta?

If there is a specific date on which the beta becomes invalid, why not code that into the programs launch routine? From your description it doesn't sound like it's a trial that will expire after X days, so why the need store counters in the registry?

Adam Pope