Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. how to detect changes in system date

how to detect changes in system date

Scheduled Pinned Locked Moved Visual Basic
helptutorialquestionannouncement
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eyes2007
    wrote on last edited by
    #1

    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

    C T 2 Replies Last reply
    0
    • E eyes2007

      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

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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 )

      E 1 Reply Last reply
      0
      • C Christian Graus

        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 )

        E Offline
        E Offline
        eyes2007
        wrote on last edited by
        #3

        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

        C C 2 Replies Last reply
        0
        • E eyes2007

          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

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          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

          E 1 Reply Last reply
          0
          • C Colin Angus Mackay

            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

            E Offline
            E Offline
            eyes2007
            wrote on last edited by
            #5

            any change in system date thats just an idea and i have to read more about that component. help everyone

            C 1 Reply Last reply
            0
            • E eyes2007

              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

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              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 )

              1 Reply Last reply
              0
              • E eyes2007

                any change in system date thats just an idea and i have to read more about that component. help everyone

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #7

                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 )

                1 Reply Last reply
                0
                • E eyes2007

                  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

                  T Offline
                  T Offline
                  Tom Deketelaere
                  wrote on last edited by
                  #8

                  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.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups