Updated December 2024: Stop getting error messages and slow down your system with our optimization tool. Get it now at this link
- Download and install the repair tool here.
- Let it scan your computer.
- The tool will then repair your computer.
To prevent access to the command prompt in the window, you can use group policy settings or modify the Windows registry to disable the command prompt. When you do this, it prevents users from running the interactive command prompt or CMD.exe. Let’s see how we can do this under Windows 8/7.
Disable command prompt
Using GPO
Open the Run field, type gpedit.msc and press Enter to open the local group policy editor. Navigate to the next path:
User Configuration/Administrative Templates/System
In the right pane, you see Prevent access to the command prompt. Double-click to define the strategy. Select On and click Apply/OK.
This policy parameter prevents users from executing the Cmd.exe interactive command prompt. 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 attempts to open a command window, the system displays a message indicating that a setting prevents action. If you disable or do not configure this policy setting, users can run Cmd.exe and batch files normally.
Here you can also disable script processing of the command prompt if you wish.
If your version of Windows does not have a group policy, you can do the following.
Use Registry
Start to open Registry editor :
HKEY_CURRENT_USERoftwarePoliciesMicrosoftWindowsSystem
If the Windows key or system key is missing, you may need to create it.
In the right pane, double-click DisableCMD and set the value to 0.
If DisableCMD is not present on your system, you may need to create a new DWORD value, name it DisableCMD, and then give it a value of 0.
If a user were now trying to open the CMD, they would see a message:
The prompt was disabled by your administrator.
December 2024 Update:
You can now prevent PC problems by using this tool, such as protecting you against file loss and malware. Additionally, it is a great way to optimize your computer for maximum performance. The program fixes common errors that might occur on Windows systems with ease - no need for hours of troubleshooting when you have the perfect solution at your fingertips:
- Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
- Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
- Step 3 : Click “Repair All” to fix all issues.
Enable CMD
If for any reason you need to do the opposite, i.e. enable the command prompt, simply disable option Prevent access to the command prompt. In the registry, you can delete DisableCMD DWORD or set its value to 1.
With our FixWin, you can also enable the prompt with a single click when it is disabled.
Hope this helps!
See this message if you want to prevent access to the Registry editor.
Expert Tip: This repair tool scans the repositories and replaces corrupt or missing files if none of these methods have worked. It works well in most cases where the problem is due to system corruption. This tool will also optimize your system to maximize performance. It can be downloaded by Clicking Here