Click here to Skip to main content
15,898,222 members
Home / Discussions / C#
   

C#

 
Questionhow to put a timer counter in my software that counts starting from the day installed? Pin
CoderForEver4-Mar-10 18:04
CoderForEver4-Mar-10 18:04 
AnswerRe: how to put a timer counter in my software that counts starting from the day installed? Pin
PIEBALDconsult4-Mar-10 18:17
mvePIEBALDconsult4-Mar-10 18:17 
GeneralRe: how to put a timer counter in my software that counts starting from the day installed? Pin
AspDotNetDev4-Mar-10 18:32
protectorAspDotNetDev4-Mar-10 18:32 
AnswerRe: how to put a timer counter in my software that counts starting from the day installed? Pin
AspDotNetDev4-Mar-10 18:19
protectorAspDotNetDev4-Mar-10 18:19 
GeneralRe: how to put a timer counter in my software that counts starting from the day installed? Pin
CoderForEver4-Mar-10 19:24
CoderForEver4-Mar-10 19:24 
GeneralRe: how to put a timer counter in my software that counts starting from the day installed? Pin
AspDotNetDev4-Mar-10 19:29
protectorAspDotNetDev4-Mar-10 19:29 
GeneralRe: how to put a timer counter in my software that counts starting from the day installed? Pin
Luc Pattyn5-Mar-10 1:45
sitebuilderLuc Pattyn5-Mar-10 1:45 
GeneralRe: how to put a timer counter in my software that counts starting from the day installed? Pin
AspDotNetDev5-Mar-10 2:07
protectorAspDotNetDev5-Mar-10 2:07 
The installation could store the the number of hours open in the registry. The app could check if that exists at install time. If it doesn't, it creates it. If it does, it leaves it as is. When the app is opened, it makes note of the number of ticks that have passed... when it is closed (and perhaps periodically in case the user forces the application close without proper finalization) it will take note of the ticks again, calculate the difference, and add that to the value in the registry.

Of course, the user could get around that, but users can get around most anything. That should be sufficiently difficult to prevent most users from toying around with it. Some more ideas to make it more secure:
  • Do some basic encryption (even with a known/static password) on the value in the registry so the user can't just open regedit and change the value to their liking. Of course, they could remember one of the previously encrypted values, if they thought of that. Or delete the key altogether, but there are ways to detect that too (and ways to get around it, and so on).
  • Make the EXE modify itself to make note of the value stored in the registry. If it doesn't match the next time the app is run, that means the user did some tampering. This will be sufficiently non-obvious to trip up most users.
  • Create a hidden folder in one of several predetermined but randomly chosen locations. If that folder exists, it means the app was installed before. This will get in the way of users who like to just delete registry keys and reinstall trial apps.


There are various solutions to problems like this, but very simple solutions will trip up the majority of users.
GeneralRe: how to put a timer counter in my software that counts starting from the day installed? Pin
Luc Pattyn5-Mar-10 2:22
sitebuilderLuc Pattyn5-Mar-10 2:22 
AnswerRe: how to put a timer counter in my software that counts starting from the day installed? Pin
MumbleB4-Mar-10 23:48
MumbleB4-Mar-10 23:48 
GeneralRe: how to put a timer counter in my software that counts starting from the day installed? Pin
CoderForEver5-Mar-10 5:58
CoderForEver5-Mar-10 5:58 
QuestionWhere in Toronto Ont Canada can I walk in and buy Visual Studio 2008 ? Pin
KenBowd4-Mar-10 13:17
KenBowd4-Mar-10 13:17 
AnswerRe: Where in Toronto Ont Canada can I walk in and buy Visual Studio 2008 ? Pin
AspDotNetDev4-Mar-10 14:07
protectorAspDotNetDev4-Mar-10 14:07 
GeneralRe: Where in Toronto Ont Canada can I walk in and buy Visual Studio 2008 ? Pin
PIEBALDconsult5-Mar-10 4:31
mvePIEBALDconsult5-Mar-10 4:31 
AnswerRe: Where in Toronto Ont Canada can I walk in and buy Visual Studio 2008 ? Pin
Ravi Bhavnani4-Mar-10 15:45
professionalRavi Bhavnani4-Mar-10 15:45 
AnswerRe: Where in Toronto Ont Canada can I walk in and buy Visual Studio 2008 ? Pin
PIEBALDconsult4-Mar-10 17:42
mvePIEBALDconsult4-Mar-10 17:42 
Questionhow to read and write to xml using dataset [modified] Pin
xiaowenjie4-Mar-10 12:51
xiaowenjie4-Mar-10 12:51 
AnswerRe: how to read and write to xml using dataset Pin
snorkie4-Mar-10 16:37
professionalsnorkie4-Mar-10 16:37 
GeneralRe: how to read and write to xml using dataset Pin
xiaowenjie4-Mar-10 21:47
xiaowenjie4-Mar-10 21:47 
AnswerRe: how to read and write to xml using dataset Pin
shawnzhang4-Mar-10 19:26
shawnzhang4-Mar-10 19:26 
QuestionRemoving All "List<*>" Items Though It Shouldn't ... ?? [SOLVED] Pin
Matt U.4-Mar-10 12:36
Matt U.4-Mar-10 12:36 
AnswerRe: Removing All "List" Items Though It Shouldn't ... ?? Pin
Luc Pattyn4-Mar-10 14:54
sitebuilderLuc Pattyn4-Mar-10 14:54 
GeneralRe: Removing All "List" Items Though It Shouldn't ... ?? Pin
Matt U.4-Mar-10 15:19
Matt U.4-Mar-10 15:19 
GeneralRe: Removing All "List" Items Though It Shouldn't ... ?? Pin
Luc Pattyn4-Mar-10 15:27
sitebuilderLuc Pattyn4-Mar-10 15:27 
GeneralRe: Removing All "List" Items Though It Shouldn't ... ?? Pin
Matt U.4-Mar-10 15:56
Matt U.4-Mar-10 15:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.