windows查看特定端口_如何防止特定用户关闭Windows

windows查看特定端口

windows查看特定端口

shut down

Windows features a ridiculous number of ways to shut down. You’ll find options on the Start menu, Administrative Tools menu, and the Login and Lock screens. You can also shut Windows down using keyboard shortcuts (Alt+F4 at the desktop) and even the command line. Here’s how to disable them all for specific users.

Windows具有许多荒唐的关闭方法。 您将在“开始”菜单,“管理工具”菜单以及“登录”和“锁定”屏幕上找到选项。 您还可以使用键盘快捷键(桌面上的Alt + F4)甚至命令行关闭Windows。 以下是针对特定用户全部禁用它们的方法。

So why bother removing shutdown access for users? There are several reasons. At home, you might want to lock that feature out for kids to prevent frustration. Or, if you use User Switching, you may have some lengthy task (like a download) running on your account while someone else uses their account. Locking out the shutdown function protects whatever you’ve got running. In a business, you might want to lock the shutdown feature out on a computer used as a kiosk. You can remove the shut down button just from the Lock and Login screens, which restricts shutting down to only users that can log in to Windows. But if you want things extra locked down, we’ve got you covered.

那么,为什么要麻烦用户删除关机访问权限呢? 有几个原因。 在家里,您可能想让孩子锁定该功能,以防止沮丧。 或者,如果您使用“用户切换”,则可能有一些冗长的任务(例如下载)在您的帐户上运行,而其他人正在使用他们的帐户。 锁定关闭功能可以保护您运行的所有内容。 在企业中,您可能想将关机功能锁定在用作信息亭的计算机上。 您可以仅从“锁定”和“登录”屏幕中删除关闭按钮,该按钮将关闭限制为仅可以登录Windows的用户。 但是,如果您希望将事情进一步锁定,我们可以为您服务。

家庭用户:通过编辑注册表禁用用户关机 (Home Users: Disable Shutdown for a User by Editing the Registry)

If you have Windows Home, you will have to edit the Windows Registry to make these changes. You can also do it this way if you have Windows Pro or Enterprise, but just feel more comfortable working in the Registry. (If you have Pro or Enterprise, though, we recommend using the easier Group Policy Editor, as described in the next section.) Keep in mind, though, that when editing the Registry, you’ll need to be logged on as the user for which you want to disable shutdown.

如果您使用Windows Home,则必须编辑Windows注册表才能进行这些更改。 如果您拥有Windows Pro或Enterprise,也可以通过这种方式进行操作,但是在注册表中工作会更自在。 (但是,如果您具有Pro或Enterprise,我们建议使用更简单的组策略编辑器,如下一节所述。)但是请记住,在编辑注册表时,您需要以用户身份登录要为其禁用关机。

Standard warning: Registry Editor is a powerful tool and misusing it can render your system unstable or even inoperable. This is a pretty simple hack and as long as you stick to the instructions, you shouldn’t have any problems. That said, if you’ve never worked with it before, consider reading about how to use the Registry Editor before you get started. And definitely back up the Registry (and your computer!) before making changes.

标准警告:注册表编辑器是一个功能强大的工具,滥用它会使您的系统不稳定甚至无法运行。 这是一个非常简单的技巧,只要您按照说明进行操作,就不会有任何问题。 也就是说,如果您以前从未使用过它,请在开始之前考虑阅读有关如何使用注册表编辑器的信息 。 并在进行更改之前一定要备份注册表 (和您的计算机 !)。

To get started, log in as the user for whom you want to make these changes. Open the Registry Editor by hitting Start and typing “regedit.” Press Enter to open Registry Editor and give it permission to make changes to your PC. In the Registry Editor, use the left sidebar to navigate to the following key:

首先,以您要对其进行更改的用户身份登录。 通过单击开始并键入“ regedit”来打开注册表编辑器。 按Enter键打开注册表编辑器,并授予其对PC进行更改的权限。 在注册表编辑器中,使用左侧边栏导航至以下键:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
wsd_reg_1

Next, you’re going to create a new value in the Explorer key. Right-click the Explorer icon and choose New > DWORD (32-bit) Value. Name the new value NoClose .

接下来,您将在Explorer键中创建一个新值。 右键单击“资源管理器”图标,然后选择“新建”>“ DWORD(32位)值”。 将新值NoClose

wsd_reg_2

Now, you’re going to modify that value. Double-click the new NoClose value and set the value to 1 in the “Value data” box.

现在,您将修改该值。 双击新的NoClose值,然后在“值数据”框中将其值设置为1

wsd_reg_3

Click OK, exit Registry Editor, restart your computer, and log in as the user for whom you made the change. That user should no longer have access to most shutdown functions (including sleep and hibernate), whether it’s from the Start menu, lock screen, or even the Alt+4 shutdown shortcut from the desktop. If they try using the shortcut method, users will see a Restrictions message instead.

单击“确定”,退出注册表编辑器,重新启动计算机,然后以进行更改的用户身份登录。 无论是从“开始”菜单,锁定屏幕,还是从桌面上的Alt + 4关机快捷方式,该用户都不再有权访问大多数关机功能(包括睡眠和Hibernate)。 如果他们尝试使用快捷方式,则用户将看到限制消息。

shutdown_restrict

The only two shutdown methods that will still work are pressing the physical power button (if that option is set in Control Panel) and using the shutdown command at the Command Prompt. You can always disable the power button from shutting down Windows and then restrict users’ access to the Control Panel if you want. You can even disable the Command Prompt itself. If you follow the steps in that article to disable the Command Prompt using the Group Policy Editor, we’d suggest that you not also disable scripting. That way, you can create a batch file that activates the shutdown command and hide it somewhere on the system so that you still have a relatively easy way to shut down Windows. If you disable the Command Prompt for a user with the Registry Editor, it will not disable scripting, so you don’t have to worry about it.

仅有的两种关机方法仍然有效:按下物理电源按钮(如果在“控制面板”中设置了该选项),并在命令提示符处使用shutdown命令。 您始终可以禁用电源按钮以关闭Windows,然后根据需要限制用户对“控制面板”的访问 。 您甚至可以禁用命令提示符本身 。 如果您按照该文章中的步骤使用组策略编辑器禁用命令提示符,建议您不要同时禁用脚本。 这样,您可以创建一个激活shutdown命令的批处理文件,并将其隐藏在系统上的某个位置,以便您仍然可以使用相对简单的方法来关闭Windows。 如果使用注册表编辑器为用户禁用命令提示符,它将不会禁用脚本编写,因此您不必担心它。

If you want to re-enable the shutdown commands for a user at any time, just log back in as that user, fire up the Registry, and set the NoClose value back to 0 (or delete it).

如果要随时为用户重新启用关闭命令,只需以该用户身份登录,启动注册表,然后将NoClose值设置回0 (或删除它)。

下载我们的一键式注册表黑客 (Download Our One-Click Registry Hack)

wsd_hacks

If you don’t feel like diving into the Registry yourself, we’ve created two downloadable registry hacks you can use. One hack removes the shutdown ability for the current user and the other restores the shutdown ability. Both are included in the following ZIP file. Double-click the one you want to use, click through the prompts, and then restart your computer.

如果您不想自己进入注册表,我们创建了两个可供下载的注册表黑客。 一种hack会删除当前用户的关机功能,而另一种hack会恢复关机功能。 两者都包含在以下ZIP文件中。 双击要使用的计算机,单击提示,然后重新启动计算机。

Shutdown Hacks

关机技巧

In Windows Pro or Enterprise, find the MSC file that you made for the users to whom you want to apply the policy, double-click to open it, and click Yes to allow it to make changes. In the Group Policy window for those users, in the left-hand pane, drill down to User Configuration > Administrative Templates > Start Menu and Taskbar. On the right, find the “Remove and prevent access to the Shut Down, Restart, Sleep, and Hibernate commands” item and double-click it.

在Windows Pro或Enterprise中,找到为要应用该策略的用户制作的MSC文件,双击以将其打开,然后单击“是”以允许其进行更改。 在这些用户的“组策略”窗口的左窗格中,向下钻取到“用户配置”>“管理模板”>“开始”菜单和任务栏。 在右侧,找到“删除并阻止访问“关机”,“重新启动”,“睡眠”和“Hibernate”命令,然后双击它。

wsd_gp1

In the policy window, click Enabled and then click OK.

在策略窗口中,单击“启用”,然后单击“确定”。

wsd_gp2

To test the changes, exit the Local Group Policy Editor, restart your computer, and then log on as the user (or a member of the user group) for whom you made the changes. If you want to re-enable shutdown, just follow these same instructions and set the policy back to Disabled (or Not Configured).

若要测试更改,请退出“本地组策略编辑器”,重新启动计算机,然后以进行更改的用户(或用户组成员)身份登录。 如果要重新启用关机功能,只需按照相同的说明进行操作,然后将策略设置回“禁用”(或“未配置”)即可。

That’s all there is to it. It may be a change that is only useful in specific circumstances, but when you do need it, it’s an easy change to make.

这里的所有都是它的。 这可能只是在特定情况下有用的更改,但是当您确实需要它时,则很容易进行更改。

翻译自: https://www.howtogeek.com/248742/how-to-prevent-specific-users-from-shutting-down-windows/

windows查看特定端口

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值