How to disable the command prompt on a Windows PC

Shaant Minhas

command prompt

The Command prompt is a powerful application. If we take the system administrator’s word as it is, it’s also a godsend for managing and controlling things around your Windows.

However, similar to any other handy tool out there, the Cmd is also susceptible to misuse. Hackers can use it to execute all kinds of havoc from afar, or if an authorized person were to get access, there are enough commands to badly damage your PC.

So, depending on your circumstances, disabling the command prompt can, in fact, work in your favor. Let’s look at the best method to do that.

How to disable the command prompt with Registry Editor

Your Windows Registry keeps a repository about all the critical data and files of Windows operating system and for other related settings on your PC. With a few changes to the Registry Editor, you can disable the Command prompt and make it inaccessible until you take back the changes.

It goes without saying that you should first take a backup of your registry. This backup will come handy if there’s some accidental data loss in your registry during the changes.

If you’re done with the backup, you can now safely move to make the changes. Here’s how you can get started:

  1. Head to the Start menu search bar, type ‘run’, and select the best match.
  2. In the run dialog box, type in ‘regedit’, and hit Enter.
  3. Now head to the following path and hit Enter:
    HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows
  4. Right-click on the Windows key, select New, and click on Key.
  5. Name the new key system and hit Enter.
  6. Now right-click on the System key, select the New submenu, and choose DWORD (32-bit) Value option.
  7. Name the new key DisableCMD and hit Enter.
  8. Double-click the newly created DWORD and set its value from 0 to 2. This will disable the cmd on your PC.
  9. Finally, click on OK.

registry editor

To make sure, all the changes get finalized, give your PC a quick restart. Now go ahead and try to launch the command prompt. If you followed all the above steps as it is, then cmd will not open up.

Disabling the Command prompt on Windows PC

Command prompt is a handy tool for power users everywhere. But, if it’s left accessible to everyone and anyone, it can be misused. Hopefully, you could easily disable the Command prompt on your PC through the above method. 

Then, to enable it again, change the DWORD value from above to 0, and save it again.