如何禁用用户在Windows中使用VB.Net更改日期时间? [英] How can I disable the user to change date time in Windows using VB.Net?

查看:90
本文介绍了如何禁用用户在Windows中使用VB.Net更改日期时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在搜索代码以禁用系统中的日期时间更改。但我找不到任何。任何人都可以告诉我它是否可能并告诉我该怎么做?提前谢谢。



我需要将它用于PC管理。用户可能会更改日期和时间,以便他们可以延长使用PC的时间。



我只是想补充说我开发的程序只运行在管理员。那么......该怎么办?



如果用户试图更改日期时间,我如何提出警告?然后保存到数据库?

解决方案

如果您真的想要一个用户无法更改的时钟,请使用时间服务器。 http://en.wikipedia.org/wiki/Time_server [ ^ ]这完全独立于PC时钟,因此不受用户本地操作的影响。



http://stackoverflow.com / questions / 1193955 / how-to-query-an-ntp-server-using-c [ ^ ]



还有更多使用谷歌。

更改系统时间是您无法以任何方式取出的基本用户权利之一,除非您想要使操作系统无法正常运行。如果可以的话,这对用户来说将是严重的犯罪行为。忘了吧。



如果你想捕捉时间变化事件(为什么?!),请参阅: http://www.stevebunting.org/udpd4n6/forensics/timechange.htm [ ^ ]。



-SA

I have been searching for codes to disable the datetime change in the system. but i cant find any. Can anyone tell me if its possible and tell me how to do it? thanks in advance.

I need to use this for the PC management. The user might change the date and time so that they could extend time in using the PC.

And I just want to add that the program I have developed is running ONLY on admin. so... what to do?

OR HOW CAN I GIVE ALERT IF THE USER HAS TRIED TO CHANGE THE DATE TIME..then save to database ?

解决方案

If you really want a clock that cannot be changed by user then use a time server. http://en.wikipedia.org/wiki/Time_server[^] This is totally independent of PC clock and so is unaffected by anything the user does locally.

http://stackoverflow.com/questions/1193955/how-to-query-an-ntp-server-using-c[^]

Plenty more using google.


Changing time on the system is one of the fundamental user's rights you cannot take out by any means, unless you want to make OS non-functional. If you could, it would be a serious crime against the user. Forget it.

If you want to capture the time change event (why?!), please see: http://www.stevebunting.org/udpd4n6/forensics/timechange.htm[^].

—SA


这篇关于如何禁用用户在Windows中使用VB.Net更改日期时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆