In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What are the two techniques for disabling the command prompt in Windows 10? I believe many inexperienced people don't know what to do about it. Therefore, this article summarizes the causes and solutions of the problem. I hope you can solve this problem through this article.
Although on Windows 10, the Command prompt console is a useful tool for quickly executing commands to change system settings, running non-graphical applications, troubleshooting problems, and automating tasks, it may sometimes be necessary to disable the console to prevent users from running unwanted commands or accessing certain programs.
The following two methods are very effective if you must restrict access to the command prompt.
Use Group Policy to disable the command prompt
On Windows 10 Professional, Enterprise, or Educational, the easiest way to prevent users from using the command prompt is to use the local Group Policy Editor.
1. Search for gpedit.msc in the taskbar search box and select the top result to open the Local Group Policy Editor.
two。 Browse the following path: user configuration > Administrative templates > system.
3. On the right, double-click the disable access command prompt policy.
4. Select the enabled option.
5. (optional) under the options section, use the drop-down menu to select whether to allow or deny running batch files (.bat and .cmd) on your computer after you disable the command prompt.
Note: it is not recommended to disable this feature if the computer runs batch files when logging in, logging out, starting, and shutting down, or if you use remote Desktop services.
6. Click apply, and then click OK.
After completing these steps, users can still open the console, but they will receive a message that the command prompt has been disabled by the administrator and can choose to press any key to terminate the session. In addition, depending on your configuration, the command prompt will no longer handle compatible scripts.
If you no longer need to restrict access to the command prompt, you can undo the changes using the same action as above, but in step 4, be sure to select the "unconfigured" option.
Use the registry to disable the command prompt
If you do not want to use the local Group Policy Editor or if you are using Windows 10 Home Edition, you can disable the command prompt through the registry.
1. Search for regedit in the taskbar search box, and then click the top result to open the Registry Editor.
two。 Browse to the following path:
HKEY_CURRENT_USER\ Software\ Policies\ Microsoft\ Windows
Tip: on Windows 10, you can now copy and paste the path into the address bar of the registry to quickly jump to the destination.
3. Right-click the Windows (folder) key, select the New submenu, and then select the item option.
4. Name the key System and press Enter.
5. Right-click the System (folder) key, select the New submenu, and then select the DWORD (32-bit) value option.
6. Name the key DisableCMD, and then press Enter.
7. Double-click the newly created DWORD and change the value from 0 to 2 to disable the command prompt while allowing batch files to run on your computer.
8. (optional) double-click the newly created DWORD and change the value from 0 to 1 to disable the command prompt while preventing the batch file from running on Windows 10.
9. Click OK to restart the computer.
After you complete these steps, the command prompt is disabled for all users. In addition, depending on your configuration, users will not be able to run batch file scripts.
In this case, to undo the changes, you can use the same action as above, but on step 3, right-click and remove the System key. If the System key has other settings, it is recommended that you change the DisableCMD DWORD value from 1 or 2 to 0, or right-click and delete the DWORD instead of deleting the System key.
After reading the above, have you mastered the two techniques of disabling the command prompt in Windows 10? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.