如果您正在寻找一种方法来防止人们关闭或注销您的 Windows 计算机,那么您来对地方了。无论您的原因是什么,有几种方法可以删除关闭或注销Windows 计算机(Windows computer)的所有选项。
默认情况下,有几种方法可以关闭Window 计算机(Window computer):单击开始(Start)并 Turn Off Computer/Shut Down,按CTRL + ALT + DEL并选择关机(Shut Down),打开命令提示符并输入(command prompt and type)关机命令,或安装第三个为您关闭计算机的派对应用程序。(party application)
在本文中,我将介绍每种方法,看看我们如何阻止关闭。请注意,您的里程会因您拥有的Windows版本而异。(Windows)如果您运行的是家庭版或更低版本(edition version)的Windows,则以下所有选项均不可用。
删除关机选项
首先,您可以使用组策略编辑器从(Group Policy Editor)开始菜单(Start Menu)和CTRL + ALT + DEL screen关闭计算机(Turn Off Computer)按钮。请注意,此编辑器在Windows Home 或 Starter 版本(Windows Home or Starter editions)中不可用。
单击开始(Start),输入gpedit.msc并按Enter。 在左窗格中,展开用户配置(User Configuration),然后展开管理模板(Administrative Templates)。最后,点击开始菜单和任务栏(Start Menu and Taskbar)。请注意,如果您希望将设置应用于计算机上的所有用户,也可以转到计算机配置下的相同位置。( Computer Configuration)
现在在右侧窗格中,双击Remove and prevent access to the Shut Down, Restart, Sleep 和 Hibernate 命令(Remove and prevent access to the Shut Down, Restart, Sleep and Hibernate commands)并将其设置为Enabled。您会在描述中注意到,这将从“开始”菜单和“任务管理器(Start Menu and Task Manager)”中删除关闭选项。
但是,用户仍然可以简单地注销Windows,然后从那里单击电源(Power) 按钮,即使在启用上述设置后仍然存在。
为防止这种情况,您需要在同一部分中找到 开始菜单上的 Remove Logoff(Remove Logoff on start menu) 设置并将其更改(section and change) 为Enabled(仅在User Configuration下)。现在用户将无法注销,也无法访问该屏幕。但是,如果计算机因任何特定原因重新启动,则会出现登录屏幕(login screen)并且可以关闭计算机。为防止出现这种情况,您还可以将组策略(Group Policy)配置为仅允许在有人登录时关闭计算机。
计算机配置 - Windows 设置 - 安全设置 - 本地策略 - 安全选项(Computer Configuration – Windows Settings – Security Settings – Local Policies – Security Options)并向下滚动到关机:允许系统关机而无需登录(Shutdown: Allow the system to be shutdown without having to log on)并将其设置为已禁用(Disabled)。
最后,您需要防止人们进入命令提示符(command prompt)并简单地输入shutdown!为此,请转到以下策略:
用户配置 - 管理模板 - 系统(User Configuration – Administrative Templates – System)并双击阻止访问命令提示符(Prevent access to the command prompt)策略并将其设置为已启用(Enabled)。
请注意,“用户配置(User Configuration)”部分中的所有内容都将适用于所有用户,甚至是管理员帐户(Administrator account),因此请务必小心并确保在需要时保留恢复访问权限的选项。我通常做的是在“开始”菜单中保留“(Start Menu)运行”命令(Run command)的选项,以便以后可以访问组策略(Group Policy)。如果您也删除该选项,那么您基本上已将自己锁定在外。
有一种方法可以将本地组策略应用于除管理员帐户(Administrator account)之外的所有用户,但它需要相当多的步骤。微软(Microsoft)已经写了一篇关于如何做到这一点的知识库文章。(knowledgebase article)
最后,为了防止用户安装第三方程序来关闭计算机,您可以在Windows中创建一个标准(非管理)(Windows)用户帐户(user account)。标准帐户大部分时间没有安装软件的权限。如果您真的想阻止任何类型的软件安装(software installation),请转到以下策略:
计算机配置 - 管理模板 - Windows 组件 - Windows Installer (Computer Configuration – Administrative Templates – Windows Components – Windows Installer )并单击Disable Windows Installer或Turn off Windows Installer。
将其设置为启用(Enabled)并从下拉框中选择始终。(Always)请注意,标准用户帐户也无法访问组策略编辑器(Group Policy editor),因此这是使用非管理帐户的另一个好理由。
让用户以标准用户身份登录还可以确保有人无法使用Windows中的远程关机命令来关闭计算机。
最后,作为额外的备份,您还可以确保关闭普通用户帐户的权限。您可以通过以下策略执行此操作:
Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\并单击关闭系统(Shut Down the System)。
默认情况下,您会看到这里已经列出了几个组,具体取决于您运行的Windows版本。(Windows)最简单的做法是删除用户组(Users group)并保留其余组。这样,您将拥有关机权限,但普通用户不会。即使他们设法找到某种方法将关闭信号发送到Windows,它也会被此策略阻止。
这就是关闭Windows 计算机的所有不同方式,所以希望这涵盖了所有内容。(Windows computer)同样(Again),这仅适用于Pro或更高版本的Windows。如果您有任何问题,请发表评论。享受!
How to Prevent Shutdown of a Windows Computer
If you’re looking for a way to prevent people from shutting down or logging off your Windows machine, you’νe come to the right place. Whatever уour reason may be, there are several ways to remove all options for shutting down or logging off a Windows comрuter.
By default, there are several ways to shutdown a Window computer: click on Start and Turn Off Computer/Shut Down, press CTRL + ALT + DEL and choose Shut Down, open the command prompt and type in the shutdown command, or install a third party application that shuts down the computer for you.
In this article, I’ll cover each method and see how we can block the shutdown. Note that your mileage will vary depending on what version of Windows you have. If you are running a Home or lower edition version of Windows, all of the options below will not be available.
Remove Shutdown Options
First, you can remove the Turn Off Computer button from the Start Menu and from the CTRL + ALT + DEL screen by using the Group Policy Editor. Note that this is editor is not available in Windows Home or Starter editions.
Click on Start, type in gpedit.msc and press Enter. In the left pane, expand User Configuration and then expand Administrative Templates. Finally, click on Start Menu and Taskbar. Note that you can also go to same location under Computer Configuration if you want the setting to apply to all users on the computer.
Now on the right pane, double-click on Remove and prevent access to the Shut Down, Restart, Sleep and Hibernate commands and set it to Enabled. You’ll notice in the description that this will remove the shutdown option from the Start Menu and Task Manager.
However, a user could still simply log off of Windows and then click the Power button from there, which remains even after enabling the setting above.
To prevent this, you need to find the Remove Logoff on start menu setting in the same section and change it to Enabled also (only under User Configuration). Now the user won’t be able to log off and won’t be able to reach that screen. However, if the computer restarts for any particular reason, the login screen will appear and the computer can be shut down. To prevent this scenario, you can also configure Group Policy to only allow shutdown of the computer when someone is logged on.
Computer Configuration – Windows Settings – Security Settings – Local Policies – Security Options and scroll down to Shutdown: Allow the system to be shutdown without having to log on and set it to Disabled.
Finally, you need to prevent people from going to the command prompt and simply typing in shutdown! To do this, go to the following policy:
User Configuration – Administrative Templates – System and double-click on the Prevent access to the command prompt policy and set it to Enabled.
Note that everything in the User Configuration section will apply to all users, even the Administrator account, so be careful and make sure you leave an option for restoring access if needed. What I normally do is leave the option for the Run command in the Start Menu so that I can get access to Group Policy later on. If you remove that option also, then you’ve basically locked yourself out.
There is a way to apply local group policies to all users except the Administrator account, but it requires quite a few steps. Microsoft has written up a knowledgebase article on exactly how to do it.
Lastly, to prevent users from installing third-party programs to shutdown the computer, you can create a standard (non-administrative) user account in Windows. The standard account does not have permission to install software most of the time. If you really want to prevent any kind of software installation, go to the following policy:
Computer Configuration – Administrative Templates – Windows Components – Windows Installer and click on Disable Windows Installer or Turn off Windows Installer.
Set it to Enabled and choose Always from the drop down box. Note that standard user accounts also cannot access the Group Policy editor, so that’s another good reason to use a non-administrative account.
Having the user logged in as a standard user will also ensure that someone cannot use the remote shutdown command in Windows to shutdown the computer.
Finally, as a extra backup, you can also make sure that the shutdown privilege is taken away from normal user accounts. You can do this by going to the following policy:
Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\ and clicking on Shut Down the System.
By default, you’ll see a couple of groups already listed here, depending on what version of Windows you are running. The easiest thing to do is to remove the Users group and leave the rest. That way, you’ll have the shutdown privilege, but normal users will not. Even if they manage to figure out some way to send the shutdown signal to Windows, it’ll be blocked by this policy.
That is about all the different ways a Windows computer can be shut down, so hopefully this covers everything. Again, this will only work on Pro or higher versions of Windows. If you have any questions, post a comment. Enjoy!