hi all,
i want to prevent the user to change the system time from
windows using my driver?
Thanks in advance
Manish K. Sharma
hi all,
i want to prevent the user to change the system time from
windows using my driver?
Thanks in advance
Manish K. Sharma
And I suppose you have invented a way of preventing them from using the
BIOS or booting DOS and changing the time that way too?
You can’t prevent the time-change trivially in the system (you can probably
hack all sorts of different things, and eventually end up with a system
where the time can not be changed from Windows, but there is no way you can
prevent the time from being changed by users as such.
You could of course write a small supervising service that periodically
checks the time in the system and either connects to an external
time-server and checks that they are in sync, or just checks for the time
changing in general, and if it’s been changed, change it back unless it’s a
minor adjustment (you are of course aware that system time does drift quite
noticably compared to “real” time, so a computer that hasn’t been adjusted
for a few weeks will be significantly out, by several seconds at least).
Also consider what happens if there is a day-light savings time in a
particular region, so on the last weekend of March (or some other arbitrary
time) the clock jumps an hour forward and is then re-adjusted back an hour
at the end of september (or some such).
–
Mats
xxxxx@lists.osr.com wrote on 03/23/2005 02:43:45 PM:
hi all,
i want to prevent the user to change the system time from
windows using my driver?Thanks in advance
Manish K. Sharma
Questions? First check the Kernel Driver FAQ at http://www.
osronline.com/article.cfm?id=256You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
ForwardSourceID:NT0000F48A
Mats,
I agree with you overall response. For monitoring there is a callback
registerable from ExRegisterCallback that will notify you of the time
change.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
“Mats PETERSSON” wrote in message
news:xxxxx@ntdev…
>
>
>
>
>
> And I suppose you have invented a way of preventing them from using the
> BIOS or booting DOS and changing the time that way too?
>
> You can’t prevent the time-change trivially in the system (you can
> probably
> hack all sorts of different things, and eventually end up with a system
> where the time can not be changed from Windows, but there is no way you
> can
> prevent the time from being changed by users as such.
>
> You could of course write a small supervising service that periodically
> checks the time in the system and either connects to an external
> time-server and checks that they are in sync, or just checks for the time
> changing in general, and if it’s been changed, change it back unless it’s
> a
> minor adjustment (you are of course aware that system time does drift
> quite
> noticably compared to “real” time, so a computer that hasn’t been adjusted
> for a few weeks will be significantly out, by several seconds at least).
>
> Also consider what happens if there is a day-light savings time in a
> particular region, so on the last weekend of March (or some other
> arbitrary
> time) the clock jumps an hour forward and is then re-adjusted back an hour
> at the end of september (or some such).
>
> –
> Mats
>
> xxxxx@lists.osr.com wrote on 03/23/2005 02:43:45 PM:
>
>> hi all,
>> i want to prevent the user to change the system time from
>> windows using my driver?
>>
>> Thanks in advance
>> Manish K. Sharma
>>
>> —
>> Questions? First check the Kernel Driver FAQ at http://www.
>> osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@3dlabs.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>> ForwardSourceID:NT0000F48A
>
>
Manish Sharma wrote:
hi all,
i want to prevent the user to change the system time from
windows using my driver?
Why? Tell us what you’re REALLY trying to do, and perhaps one of us can
suggest a practical solution.
One of the most common mistakes made when asking technical questions on
a newsgroup is to ask, “how can I implement very detailed low-level
capability X”, when in fact the poster actually wants to implement a
more generic feature Y, but has concluded on his own that the only way
to implement feature Y is by using capability X. Ask questions in a
generic way, and the immense cumulative experience on this group can
direct you to a practical answer.
–
My guess is that the original poster wants to time-bomb an application, and
prevent people from changing the time so that they can use the application
later on. Obviously the targeted group is unlikely to be developers, as we
often use the time of the file created for make-scripts (or whatever other
“build” tool being used). Of course, if it’s a “use this for free for a
month and then pay”, the easy solution is to install the product “in the
future”, and then put the time back to “now”, instead of moving the time
back again once the time-limit has expired. So if I install the application
on December 31st 2012, I’ve got some 7 and a bit years time to use it…
Of course, any prevention of changing the time will only work if the code
that checks time is sufficiently difficult to defeat… Which I must say it
probably isn’t for most cases.
–
Mats
xxxxx@lists.osr.com wrote on 03/23/2005 05:08:23 PM:
Manish Sharma wrote:
>hi all,
> i want to prevent the user to change the system time from
>windows using my driver?
>
>Why? Tell us what you’re REALLY trying to do, and perhaps one of us can
suggest a practical solution.One of the most common mistakes made when asking technical questions on
a newsgroup is to ask, “how can I implement very detailed low-level
capability X”, when in fact the poster actually wants to implement a
more generic feature Y, but has concluded on his own that the only way
to implement feature Y is by using capability X. Ask questions in a
generic way, and the immense cumulative experience on this group can
direct you to a practical answer.–
- Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Questions? First check the Kernel Driver FAQ at http://www.
osronline.com/article.cfm?id=256You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
ForwardSourceID:NT0000F4D6
If this is the goal, in many circumstances (i.e. apps that rely on a
network connection anyway) it might be acceptable to just ask a known
time server instead of relying on the local time. Of course, this is
defeatable too (think LMHOSTS and a local ntp server), but it’s trickier
than most people will be likely to do.
Mats PETERSSON wrote:
My guess is that the original poster wants to time-bomb an application, and
prevent people from changing the time so that they can use the application
later on. Obviously the targeted group is unlikely to be developers, as we
often use the time of the file created for make-scripts (or whatever other
“build” tool being used). Of course, if it’s a “use this for free for a
month and then pay”, the easy solution is to install the product “in the
future”, and then put the time back to “now”, instead of moving the time
back again once the time-limit has expired. So if I install the application
on December 31st 2012, I’ve got some 7 and a bit years time to use it…
Of course, any prevention of changing the time will only work if the code
that checks time is sufficiently difficult to defeat… Which I must say it
probably isn’t for most cases.–
Matsxxxxx@lists.osr.com wrote on 03/23/2005 05:08:23 PM:
>Manish Sharma wrote:
>
>
>>hi all,
>> i want to prevent the user to change the system time from
>>windows using my driver?
>>
>>
>
>Why? Tell us what you’re REALLY trying to do, and perhaps one of us can
>suggest a practical solution.
>
>One of the most common mistakes made when asking technical questions on
>a newsgroup is to ask, “how can I implement very detailed low-level
>capability X”, when in fact the poster actually wants to implement a
>more generic feature Y, but has concluded on his own that the only way
>to implement feature Y is by using capability X. Ask questions in a
>generic way, and the immense cumulative experience on this group can
>direct you to a practical answer.
>
>–
>- Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.
>osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@3dlabs.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com>ForwardSourceID:NT0000F4D6
–
…/ray..
Please remove “.spamblock” from my email address if you need to contact
me outside the newsgroup.
By hooking only.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Manish Sharma”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, March 23, 2005 5:43 PM
Subject: [ntdev] get system time
> hi all,
> i want to prevent the user to change the system time from
> windows using my driver?
>
> Thanks in advance
> Manish K. Sharma
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Anyway people will be able to change the date/time in the BIOS setup
screen, and the OS will use this changed date/time.
So, such a goal cannot be reached I think.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Ray Trent”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Thursday, March 24, 2005 12:46 AM
Subject: Re:[ntdev] get system time
> If this is the goal, in many circumstances (i.e. apps that rely on a
> network connection anyway) it might be acceptable to just ask a known
> time server instead of relying on the local time. Of course, this is
> defeatable too (think LMHOSTS and a local ntp server), but it’s trickier
> than most people will be likely to do.
>
> Mats PETERSSON wrote:
> >
> >
> >
> >
> > My guess is that the original poster wants to time-bomb an application, and
> > prevent people from changing the time so that they can use the application
> > later on. Obviously the targeted group is unlikely to be developers, as we
> > often use the time of the file created for make-scripts (or whatever other
> > “build” tool being used). Of course, if it’s a “use this for free for a
> > month and then pay”, the easy solution is to install the product “in the
> > future”, and then put the time back to “now”, instead of moving the time
> > back again once the time-limit has expired. So if I install the application
> > on December 31st 2012, I’ve got some 7 and a bit years time to use it…
> >
> >
> > Of course, any prevention of changing the time will only work if the code
> > that checks time is sufficiently difficult to defeat… Which I must say it
> > probably isn’t for most cases.
> >
> > –
> > Mats
> >
> > xxxxx@lists.osr.com wrote on 03/23/2005 05:08:23 PM:
> >
> >
> >>Manish Sharma wrote:
> >>
> >>
> >>>hi all,
> >>> i want to prevent the user to change the system time from
> >>>windows using my driver?
> >>>
> >>>
> >>
> >>Why? Tell us what you’re REALLY trying to do, and perhaps one of us can
> >>suggest a practical solution.
> >>
> >>One of the most common mistakes made when asking technical questions on
> >>a newsgroup is to ask, “how can I implement very detailed low-level
> >>capability X”, when in fact the poster actually wants to implement a
> >>more generic feature Y, but has concluded on his own that the only way
> >>to implement feature Y is by using capability X. Ask questions in a
> >>generic way, and the immense cumulative experience on this group can
> >>direct you to a practical answer.
> >>
> >>–
> >>- Tim Roberts, xxxxx@probo.com
> >> Providenza & Boekelheide, Inc.
> >>
> >>
> >>—
> >>Questions? First check the Kernel Driver FAQ at http://www.
> >>osronline.com/article.cfm?id=256
> >>
> >>You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> >>To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> >>ForwardSourceID:NT0000F4D6
> >
> >
> >
>
> –
> …/ray..
>
> Please remove “.spamblock” from my email address if you need to contact
> me outside the newsgroup.
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
hi,
And thanks to all for reply. But my question is “Whenever a user right
clicks on the system tray(which is present at the right side bottom
corner) for adjust or change the time and date a window is pop up(it
shows clock and clender) i am intrested to stop the window to pop up
so that user could not able to change the system time.”
Manish K. Sharma
On Thu, 24 Mar 2005 01:13:46 +0300, Maxim S. Shatskih
wrote:
> Anyway people will be able to change the date/time in the BIOS setup
> screen, and the OS will use this changed date/time.
>
> So, such a goal cannot be reached I think.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Ray Trent”
> Newsgroups: ntdev
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, March 24, 2005 12:46 AM
> Subject: Re:[ntdev] get system time
>
> > If this is the goal, in many circumstances (i.e. apps that rely on a
> > network connection anyway) it might be acceptable to just ask a known
> > time server instead of relying on the local time. Of course, this is
> > defeatable too (think LMHOSTS and a local ntp server), but it’s trickier
> > than most people will be likely to do.
> >
> > Mats PETERSSON wrote:
> > >
> > >
> > >
> > >
> > > My guess is that the original poster wants to time-bomb an application, and
> > > prevent people from changing the time so that they can use the application
> > > later on. Obviously the targeted group is unlikely to be developers, as we
> > > often use the time of the file created for make-scripts (or whatever other
> > > “build” tool being used). Of course, if it’s a “use this for free for a
> > > month and then pay”, the easy solution is to install the product “in the
> > > future”, and then put the time back to “now”, instead of moving the time
> > > back again once the time-limit has expired. So if I install the application
> > > on December 31st 2012, I’ve got some 7 and a bit years time to use it…
> > >
> > >
> > > Of course, any prevention of changing the time will only work if the code
> > > that checks time is sufficiently difficult to defeat… Which I must say it
> > > probably isn’t for most cases.
> > >
> > > –
> > > Mats
> > >
> > > xxxxx@lists.osr.com wrote on 03/23/2005 05:08:23 PM:
> > >
> > >
> > >>Manish Sharma wrote:
> > >>
> > >>
> > >>>hi all,
> > >>> i want to prevent the user to change the system time from
> > >>>windows using my driver?
> > >>>
> > >>>
> > >>
> > >>Why? Tell us what you’re REALLY trying to do, and perhaps one of us can
> > >>suggest a practical solution.
> > >>
> > >>One of the most common mistakes made when asking technical questions on
> > >>a newsgroup is to ask, “how can I implement very detailed low-level
> > >>capability X”, when in fact the poster actually wants to implement a
> > >>more generic feature Y, but has concluded on his own that the only way
> > >>to implement feature Y is by using capability X. Ask questions in a
> > >>generic way, and the immense cumulative experience on this group can
> > >>direct you to a practical answer.
> > >>
> > >>–
> > >>- Tim Roberts, xxxxx@probo.com
> > >> Providenza & Boekelheide, Inc.
> > >>
> > >>
> > >>—
> > >>Questions? First check the Kernel Driver FAQ at http://www.
> > >>osronline.com/article.cfm?id=256
> > >>
> > >>You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> > >>To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> > >
> > >>ForwardSourceID:NT0000F4D6
> > >
> > >
> > >
> >
> > –
> > …/ray..
> >
> > Please remove “.spamblock” from my email address if you need to contact
> > me outside the newsgroup.
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
Ok. So if you did manage to stop that, would they still be able to change
time using a commant prompt and the “Time” command, or do you want that
stopped too?
What is your ultimate goal? Are you merely concerned that some users may
not know how to keep the time correct in the machine, and they’ll just
willy-nilly change the time, or is the purpose of not changing the time
some other part of the system?
I’m pretty sure you could write some filter or replacement software for the
part of the system tray that supports changing time, but depending on what
you’re trying to achieve, that wouldn’t necessarily give you much.
Another option would be to configure a system service that uses a network
time protocol to set the machines time, and do this so frequently that the
user don’t have a practical window to change the time in (say every 15
seconds or some such). That would be my suggested solution. That way, the
time in the system is always correct, and there’s no reason for the user to
WANT to change the time [however, this does depend on WHY you want to
prevent people from changing the time in the system].
–
Mats
xxxxx@lists.osr.com wrote on 03/24/2005 10:35:25 AM:
hi,
And thanks to all for reply. But my question is “Whenever a user right
clicks on the system tray(which is present at the right side bottom
corner) for adjust or change the time and date a window is pop up(it
shows clock and clender) i am intrested to stop the window to pop up
so that user could not able to change the system time.”Manish K. Sharma
On Thu, 24 Mar 2005 01:13:46 +0300, Maxim S. Shatskih
wrote:
> > Anyway people will be able to change the date/time in the BIOS setup
> > screen, and the OS will use this changed date/time.
> >
> > So, such a goal cannot be reached I think.
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> > ----- Original Message -----
> > From: “Ray Trent”
> > Newsgroups: ntdev
> > To: “Windows System Software Devs Interest List”
> > Sent: Thursday, March 24, 2005 12:46 AM
> > Subject: Re:[ntdev] get system time
> >
> > > If this is the goal, in many circumstances (i.e. apps that rely on a
> > > network connection anyway) it might be acceptable to just ask a known
> > > time server instead of relying on the local time. Of course, this is
> > > defeatable too (think LMHOSTS and a local ntp server), but it’s
trickier
> > > than most people will be likely to do.
> > >
> > > Mats PETERSSON wrote:
> > > >
> > > >
> > > >
> > > >
> > > > My guess is that the original poster wants to time-bomb an
> application, and
> > > > prevent people from changing the time so that they can use the
> application
> > > > later on. Obviously the targeted group is unlikely to be
> developers, as we
> > > > often use the time of the file created for make-scripts (or
> whatever other
> > > > “build” tool being used). Of course, if it’s a “use this for free
for a
> > > > month and then pay”, the easy solution is to install the product
“in the
> > > > future”, and then put the time back to “now”, instead of moving the
time
> > > > back again once the time-limit has expired. So if I install
> the application
> > > > on December 31st 2012, I’ve got some 7 and a bit years time touse
it…
> > > >
> > > >
> > > > Of course, any prevention of changing the time will only work
> if the code
> > > > that checks time is sufficiently difficult to defeat… Which
> I must say it
> > > > probably isn’t for most cases.
> > > >
> > > > –
> > > > Mats
> > > >
> > > > xxxxx@lists.osr.com wrote on 03/23/2005 05:08:23 PM:
> > > >
> > > >
> > > >>Manish Sharma wrote:
> > > >>
> > > >>
> > > >>>hi all,
> > > >>> i want to prevent the user to change the system time from
> > > >>>windows using my driver?
> > > >>>
> > > >>>
> > > >>
> > > >>Why? Tell us what you’re REALLY trying to do, and perhaps oneof us
can
> > > >>suggest a practical solution.
> > > >>
> > > >>One of the most common mistakes made when asking technical
questions on
> > > >>a newsgroup is to ask, “how can I implement very detailed low-level
> > > >>capability X”, when in fact the poster actually wants to implement
a
> > > >>more generic feature Y, but has concluded on his own that the only
way
> > > >>to implement feature Y is by using capability X. Ask questions in
a
> > > >>generic way, and the immense cumulative experience on this group
can
> > > >>direct you to a practical answer.
> > > >>
> > > >>–
> > > >>- Tim Roberts, xxxxx@probo.com
> > > >> Providenza & Boekelheide, Inc.
> > > >>
> > > >>
> > > >>—
> > > >>Questions? First check the Kernel Driver FAQ at http://www.
> > > >>osronline.com/article.cfm?id=256
> > > >>
> > > >>You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> > > >>To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > > >
> > > >
> > > >>ForwardSourceID:NT0000F4D6
> > > >
> > > >
> > > >
> > >
> > > –
> > > …/ray..
> > >
> > > Please remove “.spamblock” from my email address if you need to
contact
> > > me outside the newsgroup.
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> > —
> > Questions? First check the Kernel Driver FAQ at http://www.
> osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@gmail.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.
> osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
> ForwardSourceID:NT0000F646
Hello Mr. Mats PETERSSON,
thanks for reply and you are right, I am intersted to save the user to
change the system time purposely for my project and that too from dos
prompt also and from windows also. This i want to do
programmatically.can you help in this
Thanks again
Manish K. Sharma
On Thu, 24 Mar 2005 10:48:23 +0000, Mats PETERSSON
wrote:
>
>
> Ok. So if you did manage to stop that, would they still be able to change
> time using a commant prompt and the “Time” command, or do you want that
> stopped too?
>
> What is your ultimate goal? Are you merely concerned that some users may
> not know how to keep the time correct in the machine, and they’ll just
> willy-nilly change the time, or is the purpose of not changing the time
> some other part of the system?
>
> I’m pretty sure you could write some filter or replacement software for the
> part of the system tray that supports changing time, but depending on what
> you’re trying to achieve, that wouldn’t necessarily give you much.
>
> Another option would be to configure a system service that uses a network
> time protocol to set the machines time, and do this so frequently that the
> user don’t have a practical window to change the time in (say every 15
> seconds or some such). That would be my suggested solution. That way, the
> time in the system is always correct, and there’s no reason for the user to
> WANT to change the time [however, this does depend on WHY you want to
> prevent people from changing the time in the system].
>
> –
> Mats
>
> xxxxx@lists.osr.com wrote on 03/24/2005 10:35:25 AM:
>
> > hi,
> > And thanks to all for reply. But my question is “Whenever a user right
> > clicks on the system tray(which is present at the right side bottom
> > corner) for adjust or change the time and date a window is pop up(it
> > shows clock and clender) i am intrested to stop the window to pop up
> > so that user could not able to change the system time.”
> >
> > Manish K. Sharma
> >
> >
> > On Thu, 24 Mar 2005 01:13:46 +0300, Maxim S. Shatskih
> > wrote:
> > > Anyway people will be able to change the date/time in the BIOS setup
> > > screen, and the OS will use this changed date/time.
> > >
> > > So, such a goal cannot be reached I think.
> > >
> > > Maxim Shatskih, Windows DDK MVP
> > > StorageCraft Corporation
> > > xxxxx@storagecraft.com
> > > http://www.storagecraft.com
> > >
> > > ----- Original Message -----
> > > From: “Ray Trent”
> > > Newsgroups: ntdev
> > > To: “Windows System Software Devs Interest List”
> > > Sent: Thursday, March 24, 2005 12:46 AM
> > > Subject: Re:[ntdev] get system time
> > >
> > > > If this is the goal, in many circumstances (i.e. apps that rely on a
> > > > network connection anyway) it might be acceptable to just ask a known
> > > > time server instead of relying on the local time. Of course, this is
> > > > defeatable too (think LMHOSTS and a local ntp server), but it’s
> trickier
> > > > than most people will be likely to do.
> > > >
> > > > Mats PETERSSON wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > My guess is that the original poster wants to time-bomb an
> > application, and
> > > > > prevent people from changing the time so that they can use the
> > application
> > > > > later on. Obviously the targeted group is unlikely to be
> > developers, as we
> > > > > often use the time of the file created for make-scripts (or
> > whatever other
> > > > > “build” tool being used). Of course, if it’s a “use this for free
> for a
> > > > > month and then pay”, the easy solution is to install the product
> “in the
> > > > > future”, and then put the time back to “now”, instead of moving the
> time
> > > > > back again once the time-limit has expired. So if I install
> > the application
> > > > > on December 31st 2012, I’ve got some 7 and a bit years time touse
> it…
> > > > >
> > > > >
> > > > > Of course, any prevention of changing the time will only work
> > if the code
> > > > > that checks time is sufficiently difficult to defeat… Which
> > I must say it
> > > > > probably isn’t for most cases.
> > > > >
> > > > > –
> > > > > Mats
> > > > >
> > > > > xxxxx@lists.osr.com wrote on 03/23/2005 05:08:23 PM:
> > > > >
> > > > >
> > > > >>Manish Sharma wrote:
> > > > >>
> > > > >>
> > > > >>>hi all,
> > > > >>> i want to prevent the user to change the system time from
> > > > >>>windows using my driver?
> > > > >>>
> > > > >>>
> > > > >>
> > > > >>Why? Tell us what you’re REALLY trying to do, and perhaps oneof us
> can
> > > > >>suggest a practical solution.
> > > > >>
> > > > >>One of the most common mistakes made when asking technical
> questions on
> > > > >>a newsgroup is to ask, “how can I implement very detailed low-level
> > > > >>capability X”, when in fact the poster actually wants to implement
> a
> > > > >>more generic feature Y, but has concluded on his own that the only
> way
> > > > >>to implement feature Y is by using capability X. Ask questions in
> a
> > > > >>generic way, and the immense cumulative experience on this group
> can
> > > > >>direct you to a practical answer.
> > > > >>
> > > > >>–
> > > > >>- Tim Roberts, xxxxx@probo.com
> > > > >> Providenza & Boekelheide, Inc.
> > > > >>
> > > > >>
> > > > >>—
> > > > >>Questions? First check the Kernel Driver FAQ at http://www.
> > > > >>osronline.com/article.cfm?id=256
> > > > >>
> > > > >>You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> > > > >>To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> > > > >
> > > > >
> > > > >>ForwardSourceID:NT0000F4D6
> > > > >
> > > > >
> > > > >
> > > >
> > > > –
> > > > …/ray..
> > > >
> > > > Please remove “.spamblock” from my email address if you need to
> contact
> > > > me outside the newsgroup.
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at http://www.
> > osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@gmail.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at http://www.
> > osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> > ForwardSourceID:NT0000F646
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
As I stated in my first reply, there’s no way to trivially do it. Don Burn
gave a hint on how to detect that the time HAS changed, and that could be
used to trigger for instance a network time unit.
There’s no particular driver for the time-keeping, it’s part of the HAL, so
you can’t really change it by adding a driver. There’s no way to “trap” the
writes to the clock-chip either.
You could of course do nasty things like patching the code in the kernel,
but that is definitely a “bad” thing to do, and I wouldn’t be surprised if
this doesn’t actually work for instance for DOS changes.
And if the user is hell-bent on changing the time, they can do it from the
BIOS setup screen, which is not under software control from anything that
you could modify.
So, again, what exactly are you trying to achieve by preventing the user
from changing the time? There may be other solutions that actually do work
for what you want to do, but you have to give us some idea of what problem
you’re actually trying to solve, rather than go in circles around the same
questions and answers. So WHY do you think that it’s a good idea to prevent
the user from changing time, and what is the REAL goal of your project?
–
Mats
xxxxx@lists.osr.com wrote on 03/24/2005 02:27:09 PM:
Hello Mr. Mats PETERSSON,
thanks for reply and you are right, I am intersted to save the user to
change the system time purposely for my project and that too from dos
prompt also and from windows also. This i want to do
programmatically.can you help in thisThanks again
Manish K. SharmaOn Thu, 24 Mar 2005 10:48:23 +0000, Mats PETERSSON
wrote:
> >
> >
> > Ok. So if you did manage to stop that, would they still be able to
change
> > time using a commant prompt and the “Time” command, or do you want that
> > stopped too?
> >
> > What is your ultimate goal? Are you merely concerned that some users
may
> > not know how to keep the time correct in the machine, and they’ll just
> > willy-nilly change the time, or is the purpose of not changing the time
> > some other part of the system?
> >
> > I’m pretty sure you could write some filter or replacement software for
the
> > part of the system tray that supports changing time, but depending on
what
> > you’re trying to achieve, that wouldn’t necessarily give you much.
> >
> > Another option would be to configure a system service that uses a
network
> > time protocol to set the machines time, and do this so frequently that
the
> > user don’t have a practical window to change the time in (say every 15
> > seconds or some such). That would be my suggested solution. That way,
the
> > time in the system is always correct, and there’s no reason for the
user to
> > WANT to change the time [however, this does depend on WHY you want to
> > prevent people from changing the time in the system].
> >
> > –
> > Mats
> >
> > xxxxx@lists.osr.com wrote on 03/24/2005 10:35:25 AM:
> >
> > > hi,
> > > And thanks to all for reply. But my question is “Whenever a user
right
> > > clicks on the system tray(which is present at the right side bottom
> > > corner) for adjust or change the time and date a window is pop up(it
> > > shows clock and clender) i am intrested to stop the window to pop up
> > > so that user could not able to change the system time.”
> > >
> > > Manish K. Sharma
> > >
> > >
> > > On Thu, 24 Mar 2005 01:13:46 +0300, Maxim S. Shatskih
> > > wrote:
> > > > Anyway people will be able to change the date/time in the BIOS
setup
> > > > screen, and the OS will use this changed date/time.
> > > >
> > > > So, such a goal cannot be reached I think.
> > > >
> > > > Maxim Shatskih, Windows DDK MVP
> > > > StorageCraft Corporation
> > > > xxxxx@storagecraft.com
> > > > http://www.storagecraft.com
> > > >
> > > > ----- Original Message -----
> > > > From: “Ray Trent”
> > > > Newsgroups: ntdev
> > > > To: “Windows System Software Devs Interest List”
> > > > Sent: Thursday, March 24, 2005 12:46 AM
> > > > Subject: Re:[ntdev] get system time
> > > >
> > > > > If this is the goal, in many circumstances (i.e. apps that rely
on a
> > > > > network connection anyway) it might be acceptable to just ask a
known
> > > > > time server instead of relying on the local time. Of course, this
is
> > > > > defeatable too (think LMHOSTS and a local ntp server), but it’s
> > trickier
> > > > > than most people will be likely to do.
> > > > >
> > > > > Mats PETERSSON wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > My guess is that the original poster wants to time-bomb an
> > > application, and
> > > > > > prevent people from changing the time so that they can use the
> > > application
> > > > > > later on. Obviously the targeted group is unlikely to be
> > > developers, as we
> > > > > > often use the time of the file created for make-scripts (or
> > > whatever other
> > > > > > “build” tool being used). Of course, if it’s a “use this for
free
> > for a
> > > > > > month and then pay”, the easy solution is to install the
product
> > “in the
> > > > > > future”, and then put the time back to “now”, instead of moving
the
> > time
> > > > > > back again once the time-limit has expired. So if I install
> > > the application
> > > > > > on December 31st 2012, I’ve got some 7 and a bit years time
touse
> > it…
> > > > > >
> > > > > >
> > > > > > Of course, any prevention of changing the time will only work
> > > if the code
> > > > > > that checks time is sufficiently difficult to defeat… Which
> > > I must say it
> > > > > > probably isn’t for most cases.
> > > > > >
> > > > > > –
> > > > > > Mats
> > > > > >
> > > > > > xxxxx@lists.osr.com wrote on 03/23/2005 05:08:23
PM:
> > > > > >
> > > > > >
> > > > > >>Manish Sharma wrote:
> > > > > >>
> > > > > >>
> > > > > >>>hi all,
> > > > > >>> i want to prevent the user to change the system time
from
> > > > > >>>windows using my driver?
> > > > > >>>
> > > > > >>>
> > > > > >>
> > > > > >>Why? Tell us what you’re REALLY trying to do, and perhaps
oneof us
> > can
> > > > > >>suggest a practical solution.
> > > > > >>
> > > > > >>One of the most common mistakes made when asking technical
> > questions on
> > > > > >>a newsgroup is to ask, “how can I implement very detailed
low-level
> > > > > >>capability X”, when in fact the poster actually wants to
implement
> > a
> > > > > >>more generic feature Y, but has concluded on his own that the
only
> > way
> > > > > >>to implement feature Y is by using capability X. Ask questions
in
> > a
> > > > > >>generic way, and the immense cumulative experience on this
group
> > can
> > > > > >>direct you to a practical answer.
> > > > > >>
> > > > > >>–
> > > > > >>- Tim Roberts, xxxxx@probo.com
> > > > > >> Providenza & Boekelheide, Inc.
> > > > > >>
> > > > > >>
> > > > > >>—
> > > > > >>Questions? First check the Kernel Driver FAQ at http://www.
> > > > > >>osronline.com/article.cfm?id=256
> > > > > >>
> > > > > >>You are currently subscribed to ntdev as:
xxxxx@3dlabs.com
> > > > > >>To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> > > > > >
> > > > > >
> > > > > >>ForwardSourceID:NT0000F4D6
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > –
> > > > > …/ray..
> > > > >
> > > > > Please remove “.spamblock” from my email address if you need to
> > contact
> > > > > me outside the newsgroup.
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at http://www.
> > > osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: xxxxx@gmail.com
> > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at http://www.
> > > osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> > > ForwardSourceID:NT0000F646
> >
> > —
> > Questions? First check the Kernel Driver FAQ at http://www.
> osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@gmail.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.
> osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
> ForwardSourceID:NT0000F69E
Manish Sharma wrote:
Hello Mr. Mats PETERSSON,
thanks for reply and you are right, I am intersted to save the user to
change the system time purposely for my project and that too from dos
prompt also and from windows also. This i want to do
programmatically.can you help in this
Have you read any of the detailed and thoughtful replies in this
thread? Several people have told you that this cannot be done
reliably. All the user has to do is reboot the computer and change the
time in the BIOS.
Tell us what you REALLY want to do. Are you trying to implement some
kind of a time-limit scheme, so that your app only works for 30 days? A
motivated user will always find a way around this, and the unmotivated
user isn’t going to try. Don Burn suggested syncing up to an NTP server
somewhere to read a reliable time, although that assumes an Internet
connection.
–
Tim Roberts wrote:
Tell us what you REALLY want to do. Are you trying to implement some
kind of a time-limit scheme, so that your app only works for 30 days? A
motivated user will always find a way around this, and the unmotivated
user isn’t going to try.
Additionally, I would consider it unethical if you sold me software
that prevented me from changing the time on *my machine*. I have the
right to set the date/time on *my machine* to whatever I want. Now,
it would be unethical of me to do that to circumvent a licensing
agreement, but that’s not the only reason I might want to change the
date/time.
–
Steve Johnson
> ----------
From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Steve Johnson[SMTP:xxxxx@pobox.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, March 24, 2005 6:43 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] get system timeTim Roberts wrote:
> Tell us what you REALLY want to do. Are you trying to implement some
> kind of a time-limit scheme, so that your app only works for 30 days? A
> motivated user will always find a way around this, and the unmotivated
> user isn’t going to try.Additionally, I would consider it unethical if you sold me software
that prevented me from changing the time on *my machine*. I have the
right to set the date/time on *my machine* to whatever I want. Now,
it would be unethical of me to do that to circumvent a licensing
agreement, but that’s not the only reason I might want to change the
date/time.
Very good point. It should be considered by every developer who tries to “protect” his software by preventing user from something. There are idiots who’re trying to detect debuggers (namely SoftICE) and their software refuses to load if one is found (in better case…). They don’t consider the case when I have a legal debugger which I need for my work.
I’d simply request money back for a software which prevents me from something I need. However, OP still haven’t said why wants to prevent users from changing system time. Maybe there is a good reason; I’m curious. Also, I’m curious why simply don’t set user rights accordingly.
Best regards,
Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]
Right okay but … in many cases it is not users machine it is users’
employer’s machine [gah! apostrophes?! :-)] … different kettle of fish
that one.
“Steve Johnson” wrote in message news:xxxxx@ntdev…
> Tim Roberts wrote:
>
>> Tell us what you REALLY want to do. Are you trying to implement some
>> kind of a time-limit scheme, so that your app only works for 30 days? A
>> motivated user will always find a way around this, and the unmotivated
>> user isn’t going to try.
>
> Additionally, I would consider it unethical if you sold me software
> that prevented me from changing the time on my machine. I have the
> right to set the date/time on my machine to whatever I want. Now,
> it would be unethical of me to do that to circumvent a licensing
> agreement, but that’s not the only reason I might want to change the
> date/time.
>
>
> –
> Steve Johnson
>
>
>
>
Then the user is not administrator and has no access to the BIOS setup
screens protected by the password. No need for such hooking tricks.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Lyndon J Clarke”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Friday, March 25, 2005 12:59 AM
Subject: Re:[ntdev] get system time
> Right okay but … in many cases it is not users machine it is users’
> employer’s machine [gah! apostrophes?! :-)] … different kettle of fish
> that one.
>
> “Steve Johnson” wrote in message news:xxxxx@ntdev…
> > Tim Roberts wrote:
> >
> >> Tell us what you REALLY want to do. Are you trying to implement some
> >> kind of a time-limit scheme, so that your app only works for 30 days? A
> >> motivated user will always find a way around this, and the unmotivated
> >> user isn’t going to try.
> >
> > Additionally, I would consider it unethical if you sold me software
> > that prevented me from changing the time on my machine. I have the
> > right to set the date/time on my machine to whatever I want. Now,
> > it would be unethical of me to do that to circumvent a licensing
> > agreement, but that’s not the only reason I might want to change the
> > date/time.
> >
> >
> > –
> > Steve Johnson
> >
> >
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
I will preface this by echoing the fact that until you tell us what you REALLY are trying to do, we have no clue how to help you.
However, if all you are wanting to do is prevent people from changing the time, why not simply remove the SeSystemTimePrivilege rights from the user in the first place? No need to do this in weird code when the system already supports a mechanism to turn off privileges to this.
–
Regards,
Dana Epp
[Blog: http://silverstr.ufies.org/blog/]
I have personally seen software that required a “re-activation” after I changed
the time on my computer. The re-activation came with a fee of $400. I dumped
that piece of software.
Burk.
Michal Vodicka wrote:
>----------
>From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Steve Johnson[SMTP:xxxxx@pobox.com]
>Reply To: Windows System Software Devs Interest List
>Sent: Thursday, March 24, 2005 6:43 PM
>To: Windows System Software Devs Interest List
>Subject: Re: [ntdev] get system time
>
>Tim Roberts wrote:
>
>
>>Tell us what you REALLY want to do. Are you trying to implement some
>>kind of a time-limit scheme, so that your app only works for 30 days? A
>>motivated user will always find a way around this, and the unmotivated
>>user isn’t going to try.
>
>Additionally, I would consider it unethical if you sold me software
>that prevented me from changing the time on *my machine*. I have the
>right to set the date/time on *my machine* to whatever I want. Now,
>it would be unethical of me to do that to circumvent a licensing
>agreement, but that’s not the only reason I might want to change the
>date/time.
>Very good point. It should be considered by every developer who tries to “protect” his software by preventing user from something. There are idiots who’re trying to detect debuggers (namely SoftICE) and their software refuses to load if one is found (in better case…). They don’t consider the case when I have a legal debugger which I need for my work.
I’d simply request money back for a software which prevents me from something I need. However, OP still haven’t said why wants to prevent users from changing system time. Maybe there is a good reason; I’m curious. Also, I’m curious why simply don’t set user rights accordingly.
Best regards,
Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
–
Dipl.-Ing. Burkhard Daniel Professional System Software Engineering
xxxxx@system-software.net http://system-software.net
fon/fax: +49-30-55153591 mobile: +49-179-5319489