We are all familiar with Windows Command Prompt, which is used to execute several standard and administrative commands to perform various tasks. By using the command prompt, you can achieve similar functions as you are doing with a keyboard and mouse, but without the graphical interface.
Due to security reasons, if you want to turn off the Command Prompt entirely on Windows 11, this gearupwindows article will help you. After disabling the command prompt, no user account on your computer can access it.
How to Prevent Access to Command Prompt on Windows 11 using Registry Editor?
Although Group Policy Editor is the best method to apply a policy on Windows PC, it is not a part of Windows 11 Home edition. So, you need to use Registry Editor to apply a policy on your Windows 11 Home computer if you use it. Rest all Pro and Enterprise editions users can continue using Group Policy.
To disable command prompt on your computer or laptop, do the following steps:-
Step 1. Open the Registry Editor.
Step 2. In the Registry Editor window, navigate to the following key from the left side pane:-
Step 3. Then, right-click on the Windows folder and select the
Step 4. Now, select the newly created System key by clicking on it. Right-click in the blank space on the right side pane and choose
Step 5. Name the newly created DWORD value as
Step 6. When done, double-click the
- 1 – Disables the command prompt, including command scripts.
- 2 – Disables command prompt only.
Step 7. Click
To test if the Command Prompt is working, open the Run command box by pressing
You should read a message, “The command prompt has been disabled by your administrator. Press any key to continue.” That means you will not be able to open the command prompt.
In the future, if you wish to enable the command prompt on your computer, browse to the following key in the registry editor:-
Then delete the DisableCMD DWORD (32-bit) Value that you have created.
How to Stop Access to Command Prompt on Windows 11 through Local Group Policy Editor?
Note: You’ll need to enable Local Group Policy Editor in Windows 11 Home edition.
Step 2. When the Local Group Policy Editor opens, navigate to the following path from the left sidebar:-
User Configuration > Administrative Templates > System
Step 3. Look for the policy name, “Prevent access to the command prompt,” and double-click on it to configure its settings on the right-side pane.
Step 4. In the “Prevent access to the command prompt” window, select the
Step 5. In the Options section, select
Step 6. Click
Step 7. Click
Step 8. Reboot your computer to apply the policy.
That’s it. Now command prompt, and the related script will not work on your computer.
If you want to enable command prompt and scripts, repeat the above steps, and in step 4 above, select the