• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
WebSetNet

WebSetNet

Technology News

  • Technology News
    • Mobile
    • Games
  • Internet Marketing
  • System Admin
    • Windows
    • Linux
    • Mac & Apple
    • Website Scripts
      • Wordpress

You can control Command Prompt access on Windows 10 – here’s how.

January 16, 2021 by billy16

Yes, you disable Command Prompt on Windows 10, and in this guide, we’ll show you two methods to complete this task.

Although, on Windows 10, the Command Prompt console is a useful tool to quickly execute commands to change system settings, run non-graphical applications, troubleshoot problems, and automate tasks, sometimes, it might be necessary to disable the console to prevent users from running unwanted commands, accessing certain programs, or when you have to comply with your organization policy.

If you must restrict access to the Command Prompt, Windows 10 includes at least two ways to disable the console using the Group Policy Editor or Registry Editor.

Related:How to disable Task Manager on Windows 10

In this Windows 10 guide, we will walk you through two ways to disable the Command Prompt console for all users.

  • How to disable Command Prompt with Group Policy
  • How to disable Command Prompt with Registry

How to disable Command Prompt with Group Policy

On Windows 10 Pro (Enterprise or Education), the easiest way to block users from using Command Prompt is with the Local Group Policy Editor.

To disable the Command Prompt console, use these steps:

  1. Open Start.
  2. Search for gpedit.msc and select the top result to open the Local Group Policy Editor.
  3. Browse the following path:

    User Configuration > Administrative Templates > System

  4. On the right side, double-click the Prevent access to the command prompt policy.

  5. Select the Enabled option.
  6. (Optional) Under the “Options” section, use the drop-down menu to select whether you want to allow or deny running batch files (.bat and .cmd) on your computer when Command Prompt is disabled.

    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.

  7. Click the Apply button.
  8. Click the OK button.

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. Also, depending on your configuration, Command Prompt will no longer process compatible scripts.

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. 5, make sure to select the Not configured option.

How to disable Command Prompt with Registry

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.

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. It is recommended to make a full backup of the device before proceeding.

To disable Command Prompt with the Windows 10 Registry, use these steps:

  1. Open Start.
  2. Search for regedit and click the top result to open the Registry Editor.
  3. Browse the following path:

    HKEY_CURRENT_USERSoftwarePoliciesMicrosoftWindows

    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.

  4. Right-click the Windows (folder) key, select the New submenu and choose the Key option.

  5. Name the key System and press Enter.
  6. Right-click the System (folder) key, select the New submenu and choose the DWORD (32-bit) Value option.

  7. Name the key DisableCMD and press Enter.
  8. Double-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.

  9. (Optional) Double-click the newly created DWORD and set the value from 0 to 1 to disable Command Prompt while preventing batch files from running on Windows 10.
  10. Click the OK button.
  11. Restart your computer.

After you complete the steps, the Command Prompt will be disabled for all users. Also, depending on your configuration, users will no longer be able to run batch files scripts.

In the case, you want to undo the changes, use the same instructions outlined above, but on step No. 4, right-click and delete the System key. However, if the “System” key has additional settings, it is recommended to either set the DisableCMD DWORD value from 1 or 2 to 0 or right-click and delete the DWORD, instead of deleting the “System” key.

We are focusing this guide on disabling Command Prompt for all users, but it is possible to restrict access to the console for specific users with these instructions.

Original Article

Related posts:

  1. The ultimate guide to fixing problems with the May 2020 Update
  2. Running out of storage? Try these tips to free up space on Windows 10
  3. Running your first batch script on Windows 10
  4. Fast Delete Complex Directories
  5. Essential command tools to fix virtually any networking issue on Windows 10
  6. FIX: Another installation is already in progress error
  7. These are all the Windows 10 keyboard shortcuts you need to know
  8. Amazon Alexa Easter eggs: Over 180 funny things to ask Alexa
  9. Amazon Alexa Easter eggs: Over 180 funny things to ask Alexa
  10. Amazon Alexa Easter eggs: Over 180 funny things to ask Alexa

Filed Under: Windows

Primary Sidebar

Trending

  • How to fix Windows Update Error 80244019
  • Windows 10 Update keeps failing with error 0x8007001f – 0x20006
  • How To Change Netflix Download Location In Windows 10
  • Troubleshoot Outlook “Not implemented” Unable to Send Email Error
  • How do I enable or disable Alt Gr key on Windows 10 keyboard
  • How To Install Android App APK on Samsung Tizen OS Device
  • 3 Ways To Open PST File Without Office Outlook In Windows 10
  • FIX: Windows Update error 0x800f0986
  • How to Retrieve Deleted Messages on Snapchat
  • Latest Samsung Galaxy Note 20 leak is a spec dump revealing key features
  • Install Android 7.0 Nougat ROM on Galaxy Core 2 SM-G355H
  • 192.168.1.1 Login, Admin Page, Username, Password | Wireless Router Settings
  • Websites to Watch Movies Online – 10+ Best Websites Without SignUp/Downloading
  • How to Backup SMS Messages on Your Android Smartphone
  • How to delete a blank page at the end of a Microsoft Word document
  • Fix: The Disc Image File Is Corrupted Error In Windows 10
  • Android 11 Custom ROM List – Unofficially Update Your Android Phone!
  • Samsung Galaxy Z Fold 3 could be scheduled for June 2021, with S Pen support

Footer

Tags

Amazon amazon prime amazon prime video Apple Application software epic games Galaxy Note 20 Galaxy S22 Plus Galaxy S22 Ultra Google Sheets headphones Huawei icloud Instagram instant gaming ip address iPhone iphone 12 iphone 13 iphone 13 pro max macOS Microsoft Microsoft Edge Mobile app office 365 outlook Pixel 6 Samsung Galaxy Samsung Galaxy Book 2 Pro 360 Samsung Galaxy Tab S8 Smartphone speedtest speed test teams tiktok Twitter vpn WhatsApp whatsapp web Windows 10 Windows 11 Changes Windows 11 Release Windows 11 Update Windows Subsystem For Android Windows 11 Xiaomi

Archives

  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org