
筆記本禁用鍵盤命令符

The Command Prompt and the Run program?are pretty powerful tools in the Windows world. If you’d rather specific users on a computer not have access to them, it’s not too hard to do.
命令提示符和運行程序是Windows世界中非常強大的工具。 如果您希望計算機上的特定用戶沒有訪問權限,那么這樣做就不太困難了。
Windows makes it pretty easy to open the Command Prompt, and there are all kinds of useful things you can do with it. It can also be a dangerous tool in the hands of the inexperienced, as it exposes a lot of power and it’s?sometimes difficult to understand the full ramifications of a command. The Run program?is similarly dangerous, as you can use it to perform many of the same commands you would at the Command Prompt. There are all kinds of reasons you might want to disable these features for certain users on a computer. Maybe you’ve got kids who share a family computer or you let guests use?your computer when they stay with you. Or perhaps you’re running a business computer as a kiosk for customers and you need to lock it down. Whatever your reason, we’ve got the fix for you.
Windows使打開命令提示符變得非常容易,并且您可以使用它進行各種有用的操作。 對于經驗不足的人來說,它也可能是一個危險的工具,因為它暴露了很多功能,有時很難理解命令的全部后果。 運行程序同樣危險,因為您可以使用它執行許多與命令提示符相同的命令。 出于各種原因,您可能想為計算機上的某些用戶禁用這些功能。 也許您有共享一臺家庭計算機的孩子,或者讓客人在和您在一起時使用您的計算機。 或者,也許您正在將商務計算機作為供客戶使用的信息亭,則需要將其鎖定。 無論您是什么原因,我們都會為您提供解決方案。
家庭用戶:通過編輯注冊表來禁用命令提示符并運行程序 (Home Users: Disable the Command Prompt and Run Program?by Editing the Registry)
If you have a?Home edition of Windows, 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 Local 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的家庭版,則必須編輯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. First, you’re going to disable the Command Prompt. In the Registry Editor, use the left sidebar?to navigate to the following key:
首先,以您要對其進行更改的用戶身份登錄。 通過單擊開始并鍵入“ regedit”來打開注冊表編輯器。 按Enter鍵打開注冊表編輯器,并授予其對PC進行更改的權限。 首先,您將禁用命令提示符。 在注冊表編輯器中,使用左側邊欄導航至以下鍵:
HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\System

Next, you’re going to create a new value in that key. Right-click the System icon and choose New > DWORD (32-bit) Value. Name the new value DisableCMD
.
接下來,您將在該鍵中創建一個新值。 右鍵單擊“系統”圖標,然后選擇“新建”>“ DWORD(32位)值”。 將新值命名為DisableCMD
。

Now, you’re going to modify?that value. Double-click the new DisableCMD
value and set the value to 1
in the “Value data” box and click OK.
現在,您將修改該值。 雙擊新的DisableCMD
值,然后在“值數據”框中將其值設置為1
,然后單擊“確定”。

Now that the Command Prompt itself is disabled, your next step is to disable the Run program. In Registry Editor, navigate to the following key:
現在,命令提示符本身已被禁用,下一步是禁用運行程序。 在注冊表編輯器中,導航到以下項:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer

Right-click the Explorer?icon and choose New > DWORD (32-bit) Value. Name the new value NoRun
.
右鍵單擊“資源管理器”圖標,然后選擇“新建”>“ DWORD(32位)值”。 將新值NoRun
。

Double-click the new NoRun
value and set the “Value data” box to 1
.
雙擊新的NoRun
值,并將“值數據”框設置為1
。

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 the Run program?or the Command Prompt. If they try to access the Run command while it’s disabled they will see the following error message.
單擊“確定”,退出注冊表編輯器,重新啟動計算機,然后以進行更改的用戶身份登錄。 該用戶將不再有權訪問運行程序或命令提示符。 如果他們在禁用運行命令的情況下嘗試訪問運行命令,則會看到以下錯誤消息。

If you want to re-enable the Command Prompt or Run program, just log back in as that user, open up the Registry, and set either value back to 0.
如果要重新啟用命令提示符或運行程序,只需以該用戶身份重新登錄,打開注冊表,然后將其中一個值都設置為0。
下載我們的一鍵式注冊表黑客 (Download Our One-Click Registry Hacks)

If you don’t feel like diving into the Registry yourself, we’ve created some?downloadable registry hacks you can use. There are hacks to disable and re-enable both the Command Prompt and Run program. All four hacks are included in the following ZIP file. Double-click the one you want to use and click through the prompts. When you’ve applied the hacks you want, restart your computer
如果您不想自己進入注冊表,我們已經創建了一些可下載的注冊表黑客,供您使用。 有一些技巧可以禁用和重新啟用命令提示符和運行程序。 以下ZIP文件中包含所有四個hack。 雙擊您要使用的一個,然后單擊提示。 應用所需的技巧后,請重新啟動計算機
Command Prompt and Run Hacks
命令提示符和運行技巧
These hacks are really just the applicable?keys, stripped down to the values we talked about in the previous section and then exported to a .REG file. Running either of the enable hacks changes the that particular value to 1. Running either of the enable hacks sets that particular value back to 0. ?And if you enjoy fiddling with the Registry, it’s worth taking the time to learn how to make your own Registry hacks.
這些hack實際上只是適用的密鑰,被精簡為上一節中討論的值,然后導出到.REG文件。 運行任何一個使能hack都會將該值更改為1。運行這兩個使能hack都會將該值恢復為0。如果您喜歡注冊表,那么花點時間學習如何制作自己的注冊表是值得的駭客。
專業版和企業版用戶:使用本地組策略編輯器禁用命令提示符并運行程序 (Pro and Enterprise Users: Disable the Command Prompt and Run Program?with Local Group Policy Editor)
If you’re using Windows Pro or Enterprise, the easiest way to disable the Command Prompt and Run program?is by using the Local Group Policy Editor. It’s a pretty powerful tool, so if you’ve never used it before, it’s worth taking some time to learn what it can do. Also, if you’re on a company network, do everyone a favor and check with your admin first. If your work computer is part of a domain, it’s also likely that it’s part of a domain group policy that will supersede the local group policy, anyway. Also, since you’ll be creating?policy tweaks for specific users, you’ll need to take the extra step of creating a policy console geared toward those users.
如果您使用的是Windows Pro或Enterprise,則禁用命令提示符和運行程序的最簡單方法是使用本地組策略編輯器。 這是一個非常強大的工具,因此,如果您以前從未使用過它,那么值得花一些時間來學習它可以做什么。 另外,如果您在公司網絡中,請給所有人一個幫助,并首先與您的管理員聯系。 如果您的工作計算機是域的一部分,則它也很可能是域組策略的一部分,無論如何,該組策略將取代本地組策略。 另外,由于您將為特定用戶創建策略調整,因此您需要采取額外的步驟來創建針對這些用戶的策略控制臺。
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?> System. On the right, find the “Prevent access to the command prompt” item and double-click it.
在Windows Pro或Enterprise中,找到為要應用該策略的用戶制作的MSC文件,雙擊以將其打開,然后單擊“是”以允許其進行更改。 在這些用戶的“組策略”窗口的左側窗格中,向下鉆取到“用戶配置”>“管理模板”>“系統”。 在右側,找到“防止訪問命令提示符”項,然后雙擊它。

Set the policy to Enabled and then click OK. Note also that there is a drop-down menu that lets you also disable Command Prompt scripting. This removes the ability for the user to run scripts and batch files. If you’re really trying to lock down the command line ability from a savvy user, go ahead and turn this setting on. If you’re just trying to remove easy access from the Command Prompt (or if you need Windows to still be able to run logoff, logon, or other batch files), leave the setting off.
將策略設置為“已啟用”,然后單擊“確定”。 還要注意,有一個下拉菜單,您還可以禁用命令提示符腳本。 這使用戶無法運行腳本和批處理文件。 如果您真的想鎖定精明的用戶的命令行功能,請繼續并啟用此設置。 如果您只是想從命令提示符中刪除方便的訪問權限(或者如果您需要Windows仍然能夠運行注銷,登錄或其他批處理文件),請取消設置。

Next, you’re going to disable the ability to access the Run program. Back in the Group Policy window for those users, find?User?Configuration > Administrative Templates?> Start Menu and Taskbar. On the right, find the “Remove Run from Start Menu” item and double-click it.
接下來,您將禁用訪問“運行”程序的功能。 返回這些用戶的“組策略”窗口中,找到“用戶配置”>“管理模板”>“開始”菜單和任務欄。 在右側,找到“從開始菜單中刪除運行”項,然后雙擊它。

Set the policy to Enabled and then click OK.
將策略設置為“已啟用”,然后單擊“確定”。

You can now exit the Group Policy Editor. If you want to test the new settings, log off?and then log back on as the user (or a member of the user group) for which you made changes. If you want to re-enable the Command Prompt or Run program, just use the editor to set the items back Not Configured (or Disabled).
現在,您可以退出組策略編輯器。 如果要測試新設置,請注銷,然后以對其進行更改的用戶(或用戶組成員)的身份重新登錄。 如果要重新啟用命令提示符或運行程序,只需使用編輯器將項目設置回“未配置”(或“禁用”)即可。
And that’s it. It takes a little doing, but it’s not too hard to lock down some of these more powerful tools from users.
就是這樣。 這需要花點功夫,但是鎖定用戶中一些更強大的工具并不難。
翻譯自: https://www.howtogeek.com/249007/how-to-disable-the-command-prompt-and-run-program-in-windows/
筆記本禁用鍵盤命令符