Policy
Prevent access to the command prompt
Windows 11 25H2
Policy overview
Key metadata and intent for this policy.
Supported OS tags: Windows10, Windows10RT, Windows11, Windows2000, Windows7, Windows8, Windows81, WindowsRT, WindowsRT81, WindowsServer2003, WindowsServer2008, WindowsServer2012, WindowsServer2012R2, WindowsServer2016, WindowsVista, WindowsXP
This policy setting prevents users from running the interactive command prompt, Cmd.exe. 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 tries to open a command window, the system displays a message explaining that a setting prevents the action. If you disable this policy setting or do not configure it, users can run Cmd.exe and batch files normally. Note: Do not prevent the computer from running batch files if the computer uses logon, logoff, startup, or shutdown batch file scripts, or for users that use Remote Desktop Services.
Registry values
How enabled and disabled states update the registry.
No explicit registry values are set for enabled or disabled states.
Policy elements
Inputs and configuration options exposed by this policy.
| Element | Type | Registry mapping | Constraints & behavior |
|---|---|---|---|
Disable the command prompt script processing also? ID DisableCMDScripts | enum | HKCU\Software\Policies\Microsoft\Windows\System\DisableCMD Type REG_DWORD | Options: Yes (1), No (2) |
Other policies in this category
Explore related policies at the same level.
- ComputerActivate Shutdown Event Tracker System State Data featureWindows Server 2003 only
- ComputerAllow Distributed Link Tracking clients to use domain resourcesWindows Server 2003, Windows XP, and Windows 2000 only
- UserCentury interpretation for Year 2000At least Windows 2000
- ComputerConfigure the behavior of the sudo commandAt least Windows 11
- UserCustom User InterfaceAt least Windows 2000
- ComputerDisplay highly detailed status messagesAt least Windows 2000
- ComputerDisplay Shutdown Event TrackerAt least Windows Server 2003 operating systems or Windows XP Professional
- ComputerDo not automatically encrypt files moved to encrypted foldersAt least Windows 2000
- ComputerDo not display Manage Your Server page at logonAt least Windows Server 2003
- UserDo not display the Getting Started welcome screen at logonWindows 2000 only
- ComputerDo not turn off system power after a Windows system shutdown has occurred.At least Windows Server 2003 operating systems or Windows XP Professional with SP1
- UserDon't run specified Windows applicationsAt least Windows 2000