How can I develop trial version of software

1k views Asked by At

I mean that my software must be run for only 7 days when it is installed on any system. It is possible with registry but i dont know how it is possible.

1

There are 1 answers

0
Heinzi On

Pseudo-code:

if myRegistryKey exists:
    dayOfFirstRun = read(myRegistryKey)
    if today > dayOfFirstRun + 7 days:
        -- Trial Version Expired --
    else
        -- ((dayOfFirstRun + 7 days) - today) Days Left --
else
    write(myRegistryKey, today)

That should be enough to get you started. Obviously, this simple method can be circumvented quite easily. For more advanced algorithms, have a look at the following related questions (and countless others on StackOverflow):