
Name the key DisableCMD and press Enter.ĭouble-click the newly created DWORD and set the value from 0 to 2 to disable Command Prompt while allowing batch files to run on the device.Right-click the System (folder) key, select the New submenu and choose the DWORD (32-bit) Value option. Right-click the Windows (folder) key, select the New submenu and choose the Key option.
Quick tip: On Windows 10, you can now copy and paste the path in the Registry's address bar to quickly jump to the key destination.
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows
Search for regedit and click the top result to open the Registry Editor. To disable Command Prompt with the Windows 10 Registry, use these steps: It is recommended to make a full backup of the device before proceeding. Warning: This is a friendly reminder that editing the Registry is risky, and it can cause irreversible damage to your installation if you do not complete the task correctly. If you do not want to use the Local Group Policy Editor or use the Home edition of Windows 10, you can still disable Command Prompt with the Registry. How to disable Command Prompt with Registry 5, make sure to select the Not configured option. If you no longer need to restrict access to Command Prompt, you can undo the changes using the same instructions outlined above, but on step No. Also, depending on your configuration, Command Prompt will no longer process compatible scripts. Once you complete the steps, users can still open the console, but they will receive a "The command prompt has been disabled by your administrator" message with an option to press any key to terminate the session. Quick note: If the computer has batch files running at logon, logoff, startup, and shutdown, or use remote desktop services, it is not recommended to disable this feature. cmd) on your computer when Command Prompt is disabled. (Optional) Under the "Options" section, use the drop-down menu to select whether you want to allow or deny running batch files (.bat and. On the right side, double-click the Prevent access to the command prompt policy. User Configuration > Administrative Templates > System Search for gpedit.msc and select the top result to open the Local Group Policy Editor. To disable the Command Prompt console, use these steps: On Windows 10 Pro (Enterprise or Education), the easiest way to block users from using Command Prompt is with the Local Group Policy Editor. How to disable Command Prompt with Group Policy How to disable Command Prompt with Registry. How to disable Command Prompt with Group Policy.