Re: How to verify the current date?
From: Dr John Stockton (spam_at_merlyn.demon.co.uk)
Date: 10/19/04
- Next message: Maarten Wiltink: "Re: How to verify the current date?"
- Previous message: Peter Piper: "Re: problems with class"
- In reply to: Justus J.: "How to verify the current date?"
- Next in thread: Jamie: "Re: How to verify the current date?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 19 Oct 2004 12:29:24 +0100
JRS: In article <vpa4n0pm5e54ssk0b2teh74jf32fn18pad@4ax.com>, dated
Sun, 17 Oct 2004 10:30:11, seen in news:alt.comp.lang.borland-delphi,
Justus J. <JustEnMarjolein@SKIPTHIS.Chello.nl> posted :
>For a simple shareware check, I would like to add a function to my app
>to verify the current date. Say, the software is allowed to run until
>november 1st, 2004 (hard-coded date limitation), how can i detect
>someone has been messing with the system date/time to bypass this
>check?
>
>I assume unfair users will change the system date/time to prevent the
>shareware nagsscreens from appearing, so I was thinking of looking for
>the newest file in the Windows directory to detect this behaviour.
>However, sooner or later people will reset their system clock to the
>real date/time, for convience in using other software.
>
>Any other suggestions? It should work on all windows version since
>(including) Win95. I'm using D4.
I've only used Win3 & Win98.
You should, of course, arrange that your software does not fail without
due warning; but there is probably no need for it to fail on a precise
date.
You could use, in addition to the plain current date, the date of
Windows boot, which is more likely to be accurate. I don't recall an
official way to get this (without trusting the present date), but when
booting Windows probably touches or creates some files - for me,
apparently c:\windows\system.ini & c:\windows\sa.dat.
Note - there can be good reasons for having future-dated files.
-- © John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Delphi 3 Turnpike 4 © <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links; <URL:http://www.bancoems.com/CompLangPascalDelphiMisc-MiniFAQ.htm> clpdmFAQ; <URL:http://www.borland.com/newsgroups/guide.html> news:borland.* Guidelines
- Next message: Maarten Wiltink: "Re: How to verify the current date?"
- Previous message: Peter Piper: "Re: problems with class"
- In reply to: Justus J.: "How to verify the current date?"
- Next in thread: Jamie: "Re: How to verify the current date?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|