How to install and register a 30 day trial

B

Brian

I have a C# application that has an install and
registration process.

I need to create a robust 30day trial that can be
register later.

I have most of the work done, but I want to know the best
way to store the date the product was installed, and then
to retrieve this.

I was thinking of using the registry, but with little
experience with security and the registry I wanted advice
first.

I need to protect against people uninstalling and
reinstalling.
Changing the install date.
Or just deleting the date so it looks like a fresh
install.

Thanks.
 
J

Jon Davis

Invent your own security method / copy protection. If there was a "standard"
way of doing things, one hack could fit all.

You might try this: Hash the date with an internally written algorithm
seeded by a random number determined at first run and stored in the registry
for all uses thereafter. The random number should itself be seeded by
DateTime.Now.Ticks. (The registry-stored randomly generated seed ensures
that a hack for one machine won't likely work on another machine.) Store the
hashed date simultaneously in the registry and as a file. If the registry
date and the file's date don't match, the directory structure has been
copied, or someone is trying to hack. If the date cannot be parsed, someone
could be trying to hack the algorithm, in which case you could choose to
cripple the product altogether.

All protections can still be hacked, but this method might work as an
initial deterrent.

One of my products has a 30-day install with this method.
http://www.jondavis.net/JDSolutions/products.aspx#BlackAlarmClock

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top