how to detect changes in system date
-
hi all, i am developing an application (a 15 days trial version). can someone tell me how can i handle the situation, when the user change the system date, the application must not start. how can i detect the changes in system date. or if someone have any other logic to handle it anyway. thanks in advance help everyone
-
hi all, i am developing an application (a 15 days trial version). can someone tell me how can i handle the situation, when the user change the system date, the application must not start. how can i detect the changes in system date. or if someone have any other logic to handle it anyway. thanks in advance help everyone
Every time the app stores, you need to store the date somewhere. If the date goes backwards, you store that it's gone backwards and the app therefore will no longer start.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Every time the app stores, you need to store the date somewhere. If the date goes backwards, you store that it's gone backwards and the app therefore will no longer start.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
thanks christian i am thinking about to use file system watcher, what do u say and i am also keeping an eye on the date and time as well as u say. but their is a problem, if the user install the product on day 1, after 15 days he change the date and can use the product. how can i resolve that any idea. thanks again help everyone
-
thanks christian i am thinking about to use file system watcher, what do u say and i am also keeping an eye on the date and time as well as u say. but their is a problem, if the user install the product on day 1, after 15 days he change the date and can use the product. how can i resolve that any idea. thanks again help everyone
eyes2007 wrote:
i am thinking about to use file system watcher, what do u say
What would watching the file system achieve?
Upcoming FREE developer events: * Developer Day Scotland My website
-
eyes2007 wrote:
i am thinking about to use file system watcher, what do u say
What would watching the file system achieve?
Upcoming FREE developer events: * Developer Day Scotland My website
-
any change in system date thats just an idea and i have to read more about that component. help everyone
eyes2007 wrote:
help everyone
I don't see what the point is. I told you what to do, and you're talking about something else that won't work.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
thanks christian i am thinking about to use file system watcher, what do u say and i am also keeping an eye on the date and time as well as u say. but their is a problem, if the user install the product on day 1, after 15 days he change the date and can use the product. how can i resolve that any idea. thanks again help everyone
eyes2007 wrote:
i am thinking about to use file system watcher, what do u say
Sounds bizarre to me. Why not do what I suggested instead ?
eyes2007 wrote:
but their is a problem, if the user install the product on day 1, after 15 days he change the date and can use the product. how can i resolve that any idea.
Refer to my original answer.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
hi all, i am developing an application (a 15 days trial version). can someone tell me how can i handle the situation, when the user change the system date, the application must not start. how can i detect the changes in system date. or if someone have any other logic to handle it anyway. thanks in advance help everyone
here is how I would do it (wich resembles what christian said I think) on installing the programme --> store the current date everytime the programme starts --> store the current date in second location now on startup off you'r programme you do 2 checks: first check to see if the current date is before the date stored in location 2 if so --> user had turend clock back and trial ends if not --> do check 2 check to see if the current date isn't 15 days after the date stored at location 1 if so --> trial has ended if not --> store date in location 2 and start programme to keep the user from hacking you'r programme (or at least make it harder too do) you might want to encrypt the date's hope this helps Credit to Christian who gave me this idea and I think this was also what he meant in his reply
If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistakes.