Command Prompt is a command-line interpreter application that is available in all versions of windows. Command Prompt is also known as cmd, you can open the command prompt from the run command by typing cmd. Command prompt allows you to run multiple commands and also you can create batch files to automate a few basic tasks. You can use the command prompt efficiently by creating a batch file script and automate it using a task scheduler. And command prompt is very powerful compare to apps with graphical user interfaces, also command prompt commands gives us a direct line of communication with the operating system.
If you Know DOS command well then you can do literally anything with the system. Many users use the command prompt to check the network connections status. Ping, netstat, and ipconfig commands which can tell you a lot about your network status. Also, you can repair Windows operating system using command prompt. So if you want to control the restriction of any computer then the first thing you need to block the Command Prompt. This article will guide you to Disable Command Prompt in Windows 10.
Disable Command Prompt:
If you are decided to Disable or block the Command Prompt, then you can achieve it using two methods.
Method 1: Using Registry Editor
Method 2: Using Group Policy Editor
Method 1: Disable Command Prompt Using Registry Editor
Note: Modifying the Registry is risky, and it causes irreversible damage to your OS Installation Follow the steps correctly. Friendly advice Before Modifying Registry Creating Restore Point is recommended.
Open Run command by pressing Windows + R and type regedit and hit enter. This command will open the Registry Editor.
Now Navigate to the following path.
Computer\HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\System
In some systems, you can’t find the system registry key under windows. If you are not able to find the System Key then create it by right-clicking on Windows and choose New > Key. And Name the Key as a System.
From the Left-hand side click on the System and from the right-hand side right-click on an empty area and choose New > DWORD (32-bit) Value. And name it as DisableCMD.
Double Click on the DisableCMD and enter the value 2 and click on OK.
Restart the system once to make it effective.
Method 2: Using Group Policy Editor
Open Run command by pressing Windows + R and type gpedit.msc and open Group Policy Editor.
Now navigate to the following path
User Configuration > Administrative Templates > system
From Left-hand side click on the System and from the right-hand side look for the policy named “Prevent access to the command prompt”
This policy setting prevents users from running the interactive command prompt, Cmd.exe. This policy setting also determines whether batch files (.cmd and .bat) can run on the computer. If you enable this policy setting and the user tries to open a command window, the system displays a message explaining that a setting prevents the action. If you disable this policy setting or do not configure it, users can run Cmd.exe and batch files normally.
Double click on the Policy and open policy settings. Click on Enabled and if you want to block the execution of scripts. Then choose Yes from the drop-down menu.
Click on Ok and then restart the system once. Then next time when you open the command prompt you will get the following message.
“The Command Prompt has been disabled by your administrator”