How can I develop trial version of software
I mean that my software must be run for only 7 days when it is installed on any system. It is possible w开发者_运维问答ith registry but i dont know how it is possible.
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):
- Need Advice on Implementing a Time-limited Trial
- How to create trial version of .NET software?
精彩评论