The command prompt window in the Windows operating system can be disabled by following the steps below.
- In Windows Vista and later, click Start and type gpedit.msc in the Windows Search box, then press Enter.
- In Windows XP and earlier, click Start and select Run. In the Run box, type gpedit.msc and press Enter.
- In the Group Policy window, browse to the User Configuration\Administrative Templates and highlight the System folder.
- In the System folder, double-click “Prevent access to the command prompt.”
- Change the Setting to Enabled, then click Ok.
When entering the command prompt, you receive a message similar to the example below.
To follow the steps listed below, you’ll need administrator rights and access to the Microsoft Windows Group Policy editor.
The command prompt has been disabled by your administrator.Press any key to continue.
If you want to re-enable this feature, follow the above steps. However, instead of setting the option to “Enabled,” change it to the default setting of “Not configured.”
Related information
- Do I need to have MS-DOS on my computer?
- See the Group Policy Object - GPO definition for further information and related links.
- MS-DOS and Windows command line help and support.