Command Prompt is a very important part of Windows from where most of the Windows settings can be manipulated. If all the users have access to the command prompt, it is highly likely that people could misuse it and make your computer vulnerable to security threats and even jeopardise your system settings. Fortunately, in Windows, disabling and enabling command prompt is a super easy task and it can be achieved in 2 different ways; through the Registry editor and through the Local Group Policy Editor.
In this article, we explain how you can easily disable your command prompt so that your system is protected from unwanted setting changes.
Table of Contents
How to Disable Command Prompt Through Registry Editor
Unstable registry settings can definitely cause serious issues to your system and it is very highly recommended to take a backup of your registry settings before making any changes to it. If anything undesirable happens after you make changes to the Registry Editor, you can always restore your previous settings using this backup.
Step 1: Launch the Run window by pressing the Win and R keys at once.
Type in regedit and hit the OK button.
Step 2: In the Registry Editor window, copy & paste the following URL in the navigation bar first.
Make sure you are on the folder Windows. As next, right click on the Windows folder, click on New and then click on the Key option.
Step 3: Click on the newly created key, press F2 and name it as System.
Step 4: Now select the System key by clicking on it. On the right side of the window, right click on an empty space. Click on the New option from the right click context menu and then click on DWORD (32-bit) Value.
Step 5: Name the newly created DWORD value as DisableCMD by pressing the F2 button to rename.
Step 6: Now double click on the DisableCMD DWORD to edit its Value data field. Give the value as 1 to disable the Command Prompt.
That’s it. If you would like to test whether you have successfully disabled the Command Prompt or not, please follow the steps below.
How to Check Whether Command Prompt is Disabled or Not
Step 1: Launch the Run window by pressing the keys Win & R together. Type in cmd and hit Enter key.
Step 2: Command Prompt would launch, but you will get the message The command prompt has been disabled by your administrator, proving you have successfully disabled the Command Prompt in your machine.
How to Revert Disabling Command Prompt
If you ever want to enable the Command Prompt back again, simply browse to the same URL,
and delete the DisableCMD DWORD value you created under the System key.
How to Disable Command Prompt Through Local Group Policy Editor
Step 1: Launch the Run window first, by pressing Win and R keys simultaneously.
Type in gpedit.msc and hit Enter key to launch the Local Group Policy Editor window.
Step 2: In the Local Group Policy Editor window,
- Expand the User Configuration folder first, in the left window pane.
- Then expand the Administrative Templates folder.
- Finally, expand the System folder.
- Now in the right pane of the window, double click on the setting named Prevent access to the command prompt.
Step 5: Choose the radio button corresponding to Enabled first.
Now, under the section Options, choose Yes against Disable the command prompt script processing also? question.
Once done, hit Apply and OK buttons.
Step 6: If you ever want to enable the Command Prompt again, simply choose the radio button corresponding to Not Configured instead of Enabled in the same window.
That’s it. Please tell us in the comments whether you found the article useful.
Someone who is in love with writing and technical tricks & tips.