大多数情况下,Windows 用户都能够更改日期和时间,尤其是在具有管理权限的单用户场景中。也就是说,如果您是管理员(Administrator),并且您不希望任何人更改日期和时间,则可以轻松阻止用户更改Windows 11/10中的日期和时间。这种情况在管理员需要确保所有 PC 同步以使应用程序正常工作的公司中非常常见。这也确保了安全性。一种方法是仅创建一个标准用户帐户,但如果您有多个管理员,您可以阻止所有管理员更改Windows 11/10中的日期和时间,除了您自己。
如果要锁定系统时间和日期,可以使用注册表(Registry)或组策略阻止用户更改(Group Policy)Windows 11/10中的日期(Date)和时间(Time)。您还可以选择为某个特定用户禁用它。在我们继续之前,请确保您创建了一个系统还原点——如果出现任何问题,这将很有帮助。
防止用户更改日期(Date)和时间(Time)
有两种方法可以做到这一点。一个是您更改注册表项的位置,第二个是组管理策略。对于组策略方法,您需要拥有Pro、Education和Enterprise版本。(Enterprise)
1:防止用户使用注册表编辑器更改(Registry Editor)日期(Date)和时间(Time)
打开运行提示符(Windows Key + R),然后键入 regedit 并按 Enter 键打开 注册表编辑器。( Registry Editor.)
导航到以下键:
HKEY_CURRENT_USER\Software\Policies\Microsoft\
检查您是否有Control Panel\International。如果没有,请右键单击Microsoft,然后选择New > Key。将此键命名为Control Panel。然后再次右键单击Control Panel,然后创建另一个Key并将其命名为International。
现在右键单击International ,然后选择 New > DWORD (32-bit) value。
将这个新创建的 DWORD 命名为 PreventUserOverrides 然后双击它并给它一个值1。选项包括:
- 0 =启用(Enable)(允许(Allow)用户更改日期和时间)
- 1 =禁用(Disable)(阻止(Prevent)用户更改日期和时间)
同样,按照相同的步骤进入以下位置:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International
完成后,关闭所有内容并重新启动 PC 以保存更改。
2:防止用户使用组策略编辑器更改(Group Policy Editor)日期(Date)和时间(Time)
注意:(Note:) 本地组策略编辑器(Group Policy Editor)在Windows 10 家庭(Home)版用户中不可用,因此此方法仅适用于专业版(Pro)、教育(Education)版和企业(Enterprise)版用户。
打开运行提示符(Windows Key + R),然后输入 gpedit.msc 并按 Enter。
导航到 Computer Configuration > Administrative Templates > System > Locale 服务(Services)。
双击 禁止用户覆盖区域设置(Disallow user override of locale settings) 策略。
要为所有(All)用户启用更改日期(Date)和时间格式(Time Formats):选择未配置(Not Configured )或禁用。(Disabled.)
禁用更改所有(All)用户的日期(Date)和时间格式(Time Formats):选择启用。(Enabled.)
Apply,然后单击 OK 并退出。重新启动系统。
此策略更改将确保防止用户通过更改其用户覆盖来自定义其区域设置。如果有任何用户特定的设置,它将覆盖它们。您需要先从这里重置它,然后本地政策才会改变。
现在这是你应该知道的一件事。当启用又名阻止(Prevent)模式时,本地用户仍然可以选择安装在系统上的备用语言环境,除非其他策略阻止。但是,他们将无法自定义这些选择。
该系统的缺点是它将适用于所有人。如果您想为单个用户执行此操作,我们需要基于每个用户设置此策略,确保将预计算机策略设置为 Not Configured。
3:防止特定用户使用组策略编辑器更改(Group Policy Editor)日期(Date)和时间(Time)
为此,我们必须从Microsoft 管理控制台(Microsoft Management Console)加载组策略对象编辑器。
从运行提示打开mmc.exe 。这将启动MMC控制台。
Click File > Add/remove管理单元> Add Group Policy Object Editor,然后单击添加(Add) 按钮
在出现的对话框中,单击“浏览”。
单击(Click)“用户”选项卡并选择一个用户。
现在遵循相同的路径,但在User Configuration > Administrative Templates > System > Locale Services下。
双击 禁止用户覆盖区域设置(Disallow user override of locale settings) 策略。
要为所有(All)用户启用更改日期(Date)和时间格式(Time Formats):选择未配置(Not Configured )或禁用。( Disabled.)
禁用更改所有(All)用户的日期(Date)和时间格式(Time Formats):选择启用。(Enabled.)
最后一种方法是最有效的方法,因为您可以针对特定用户而不是特定管理员。随着用户的成长,有些人非常适合成为管理员,而有些人仍在学习。这就是为什么您需要在每个用户的基础上禁用它们,而不是为 PC 上的所有用户更改它们。
Hope this helps!
Prevent Users from Changing the Date and Time in Windows 11/10
Most of the time Wіndows users are able to change thе date, and time, especially in a single-user scenario where it has administrative privileges. That said if you have a case whеre you are an Administrator, and you don’t want anyone to change the date and time, you can easily prevent users from changing the date and time in Windows 11/10. This scenario is very common in a company where administrators nеed to make sure that all the PCs are in ѕync for aрplications to work. This also makes surе ѕecurity is at par. One way is to create only a standard user account, but if you have multiple admіns, you can prevent all of them from changing the date and time in Windows 11/10, except for yourself.
If you want to lock system time and date, you can prevent Users from changing the Date and Time in Windows 11/10, using Registry or Group Policy. You can also choose to disable it for one particular user. Before we go ahead, make sure you create a system restore point – which will be helpful if anything goes wrong.
Prevent Users from changing the Date and Time
There are two methods to do this. One is where you change registry keys, and the second is group admin policy. You will need to have Pro, Education and Enterprise edition for group policy method.
1: Prevent Users from changing Date & Time using Registry Editor
Open run prompt (Windows Key + R ), and then type regedit and hit Enter to open Registry Editor.
Navigate to the following key:
HKEY_CURRENT_USER\Software\Policies\Microsoft\
Check if you have Control Panel\International. If not, right-click on Microsoft and then select New > Key. Name this key as Control Panel. Then again right-click on Control Panel, and then create another Key and name it as International.
Now right-click on International then select New > DWORD (32-bit) value.
Name this newly created DWORD as PreventUserOverrides then double-click on it and give it a value of 1. The options are:
- 0 = Enable (Allow users to change the date and time)
- 1 = Disable (Prevent users from changing the date and time)
Similarly, follow the same procedure to inside the following location:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International
Once finished, close everything and reboot your PC to save changes.
2: Prevent users from changing Date & Time using Group Policy Editor
Note: Local Group Policy Editor isn’t available in Windows 10 Home edition users, so this method is only for Pro, Education and Enterprise edition users.
Open run prompt (Windows Key + R ), then type gpedit.msc and hit Enter.
Navigate to Computer Configuration > Administrative Templates > System > Locale Services.
Double-click on Disallow user override of locale settings policy.
To Enable Changing Date and Time Formats for All Users: Select Not Configured or Disabled.
To Disable Changing Date and Time Formats for All Users: Select Enabled.
Apply, and then click on OK and exit. Restart your system.
This policy change will make sure to prevent the user from customizing their locale by changing their user overrides. In case there are any user-specific settings, it will override them. You will need to reset it from here first, and then the local policy will change.
Now here is one thing you should know. When it is enabled aka Prevent mode, the local users can still choose alternate locales installed on the system unless prevented by other policies. However, they will be unable to customize those choices.
The drawback of this system is that it will be applied for all. If you want to do it for one single user, we need to set this policy on a per-user basis, make sure that the pre-computer policy is set to Not Configured.
3: Prevent particular user from changing Date & Time using Group Policy Editor
To do this, we will have to load the group policy object editor from the Microsoft Management Console.
Open mmc.exe from the run prompt. This will launch the MMC console.
Click File > Add/remove snapin > Add Group Policy Object Editor and click the Add button
In the dialog which appears, click “Browse”.
Click the “Users” tab and select a user.
Now follow the same path but under User Configuration > Administrative Templates > System > Locale Services.
Double-click on Disallow user override of locale settings policy.
To Enable Changing Date and Time Formats for All Users: Select Not Configured or Disabled.
To Disable Changing Date and Time Formats for All Users: Select Enabled.
The last method is the most effective method as you can target one particular user instead of one particular admin. As users grow up, some are perfect to be admin while others are still learning. This is why you need to disable them on a per-user basis, instead of changing them for all the users on the PC.
Hope this helps!