How can I prevent a user from changing the system date and time in Windows XP SP3?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: How can I prevent a user from changing the system date and time in Windows XP SP3?

  1. #1
    Join Date
    Nov 2011
    Location
    India
    Posts
    128

    How can I prevent a user from changing the system date and time in Windows XP SP3?

    Hi,

    I'm using Windows XP SP3.

    It's running a third party(VC++) application that uses the system date and time.

    It has no internet access.

    It seems that some of the staff are changing the system date and time, and thereby affecting the date and time, The third party application will not run properly.

    is there a way to prevent from changing the system date and time ? Pls help me.
    Regards,

    SaraswathiSrinath

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,840

    Re: How can I prevent a user from changing the system date and time in Windows XP SP3

    If it's a domain computer, then just edit the user's group policy.

    If this is some sort of timeclock machine for calculating important things like work hours...then not having an internet connection is a very unintelligent setup! You should always be checking the time from a central server.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Nov 2011
    Location
    India
    Posts
    128

    Re: How can I prevent a user from changing the system date and time in Windows XP SP3

    Hi PeejAvery,

    Actually I'm using a single computer, It has no internet connection & also don't have the local network connection.

    My PC connect with a machine & run a VC++ Serial port application for communicate PC with Machine. Its working good.

    But, i like to add the "software - Trial pack offer" for my clients.

    If i written a logic using system time means the client must be change the system time.

    so please tell me the procedure to prevent this problem.

    B'cos i don't know about system's hardware process.
    Regards,

    SaraswathiSrinath

  4. #4
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,632

    Re: How can I prevent a user from changing the system date and time in Windows XP SP3

    As long as the users run as admins you can't prevent them from doing anything.

    You might use an alternative solution like:
    - Refusing to run if the system clock has been set back since last run.
    - Call GetTickCount now and then, accumulate and limiting the total time the app has been runned.

    Remember though that all software protection schemes are breakable, no matter what effort you put into it.
    Last edited by S_M_A; April 16th, 2012 at 12:57 AM.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    http://www.microsoft.com/visualstudio/eng/downloads

  5. #5
    Join Date
    Nov 2011
    Location
    India
    Posts
    128

    Re: How can I prevent a user from changing the system date and time in Windows XP SP3

    I have a small doubt, then how can Microsoft & other provider offers Trial pack to his clients?

    what is the logic using for trial pack?
    Regards,

    SaraswathiSrinath

  6. #6
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,632

    Re: How can I prevent a user from changing the system date and time in Windows XP SP3

    I haven't tried to tamper with any of MS trial packs so I don't know how hard it is to bypass. Anyway, most users tend to want to have a proper time in their machines. Pretty much everything gets awfully confusing when file time stamps can't be trusted anymore.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    http://www.microsoft.com/visualstudio/eng/downloads

  7. #7
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,840

    Re: How can I prevent a user from changing the system date and time in Windows XP SP3

    The only solution to your setup is to put the keyboard and mouse under lock and key. Then use a USB barcode scanner for the user to check in/out.

    The only professional method is to use a remote server for all timestamping and central logging.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center