How do I disable Command Prompt on Windows 10

On Windows 10, Command Prompt is indeed a great powerful feature that lets you do all kinds of important things on your computer quickly. However, sometimes you might need to disable Command Prompt for certain users to prevent them from accessing the unwanted commands when you have to abide by a certain policy.

If you want to apply this restriction on your computer, you can use two methods to disable the console using the Local Group Policy and the Registry Editor.

How to Disable Command Prompt on Windows 10

You can use two methods to disable command prompt on your Windows 10 PC:

  • Using Local Group Policy Editor.
  • Through Registry Editor.

1] Using Local Group Policy 

If you’re using Windows 10 Pro, Enterprise, or Education version then you can use Group Policy to block users from using Command Prompt. Here are the steps to do so:

  • Right-click on the Start button and select Run
  • In the text field, type gpedit.msc and hit Enter.
  • In the Local Group Policy Editor window, go to the following path:

User Configuration > Administrative Templates > System

How do I disable Command Prompt on Windows 10

  • Move to the right pane and double-click the Prevent access to the command prompt policy.

disable Command Prompt on Windows 10

  • On the next page, mark the Enabled checkbox.
  • If you want to disable the command prompt script processing also then go to the Options section and select Yes.
  • Click Apply > OK button.

After performing the above steps, you can still open the console, but you will receive a message – “The command prompt has been disabled by your administrator”.

2] Through Registry Editor

If you’re using Windows 10 home edition, you can’t use the local group policy on your computer. In such a case, you can use Registry Editor to disable the command prompt on your Windows 10 PC. To continue it, follow the below steps:

  • Open Run dialog box using Windows+R keys.
  • In the text field, type regedit and press Enter to open the Registry Editor.
  • On the following screen, browse the following path. Alternatively, copy and paste the given path in the Registry’s address bar to open the key destination directly. 

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows

  • Right-click the Windows key and select New > Key.
  • Name the new key “System” and press Enter.
  • Now right-click on the System folder and select New > DWORD (32-bit) Value.
  • Name the created key “DisableCMD” and press Enter.

How do I disable Command Prompt

  • Then double-click on the DisableCMD DWORD and set the Value data from 0 to 2. This will disable Command Prompt while allowing batch files to run on the device. To disable Command Prompt while preventing batch files from running on Windows 10, set the Value data from 0 to 1
  • Click the OK button to save the changes.
  • Close the window and reboot your computer.

Once you perform the above steps, the Command Prompt is now completely disabled for all users.

Leave a Reply