contador Saltar al contenido

Prevent access to command prompt in Windows

The Windows command prompt is a robust solution for administrators that allows you to quickly and easily maintain an operating system running smoothly. the average user rarely has a use for the command prompt.

Rather than inviting the temptation, many administrators prevent access to the command prompt to discourage users from troubleshooting computer errors and where they could compromise the integrity of a system.

The Windows command prompt

The Windows command prompt (sometimes called a DOS prompt) is a tool that allows administrators to create batch functions, resolve computer errors, and invoke system-level commands to simplify and make administration more efficient. The average user has little use for this tool.

The web full of tips on how to fix errors on a Windows-based PC. Some users take responsibility for solving and correcting their mistakes rather than waiting for a professional.

Some administrators make it simple for themselves and prevent user access to the command prompt instead of disabling certain functions based on the function function. Preventing access to the Command Prompt is a quick way to ensure users don't peek into areas where they shouldn't be browsing.

Disable the Windows command prompt via Group Policy

Note: this method described below works on Windows Vista, Windows 7 and Windows 8/10, but will not work with Home or Starter versions as it does not include support for editing Group Policy. In these cases, you can use the registry method shown below.

Sign in to Windows using an account with administrative privileges. click on Start> Run to open the dialog Run . If you don't see the command Run in the menu Start, hold the button Windows on the keyboard and press the key R. In the box Run, type gpedit.msc and do click on button OK .

In the left pane of the window Local group policy editor, open the folder in User Configuration> Administrative Templates> System . Make sure to click on the folder System instead of expanding it.

In the right pane, locate and double-click an entry named Prevent access to command prompt .

Now you should look into the window Prevent access to command prompt . Like most Windows installations, this setting must be set to the option Not configured . Click on the option Qualified and do click on button OK .

Close all other open windows and you're done. It is not necessary to restart the computer for the settings to take effect. All PC users are now denied access to the command prompt.

Disable access to the command prompt via the registry

If you do not have access to Group Policy settings, you can manually access the registry and disable the command prompt. To do this, you should first make sure that you back up the registry in case something goes wrong.

Go ahead and open the registry editor by clicking Start and typing regedit . Go to the following path:

 HKEY_CURRENT_USER  Software  Policies  Microsoft  Windows  

You will see a couple of keys under the Windows key, but probably not System . If there is no system key under Windows, you need to create it. You can do this by right clicking on Windows and choosing New key .

Name the System key, select it, then right-click in the right pane and choose NewDWORD value (32 bit) .

Name the value DisableCMD and hit Enter. Then double click on it to edit it, choose Decimal is assign him the value 2 . This means disabling only the command prompt. The value 0 will enable the command prompt and the value 1 will disable the command prompt and prevent script execution.

The change should take effect immediately. If you try to open the command prompt, it will be displayed, but with the following message:

Although Command Prompt is a useful administrative tool, few occasional Windows 7 users have used it. Rather than denying access to operating system functionality based on the function function, many administrators prefer to prevent access to the command prompt using one of the methods above. To enjoy!