Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Store Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems.

Go Back   Vista Forums > Vista Forums > Tutorials

Command Prompt - Enable or Disable

Poll: Did this Tutorial help and work for you?
Poll Options
Did this Tutorial help and work for you?

Comment
 
Tutorial Tools Display Modes
<!-- google_ad_section_start -->Command Prompt - Enable or Disable<!-- google_ad_section_end -->
Command Prompt - Enable or Disable
How to Enable or Disable the Command Prompt in Vista
Published by Brink
05-12-2008

How to Enable or Disable the Command Prompt in Vista

INFO: This will show you how to Enable or Disable the Command Prompt with the option to also disable command scripts (.cmd and .bat files) from running for all users on the computer. The command prompt is enabled by default in Vista.

NOTE: If you disable the command prompt and a user tries to open a command prompt window, the system displays a message explaining that a setting prevents the action. See the disabled example below.

RELATED LINKS:
1. How to Use Open Command Prompt Window Here in Vista

2. How to Run Disk Defragmenter from the Command Prompt in Vista

3. List of Commands for Vista and How to Use Them


EXAMPLE: Command Prompt Enabled

CMD_Prompt_Enabled.jpg
RunAs_CMD_Prompt_Enabled.jpg

EXAMPLE: Command Prompt Disabled

Command_Prompt_Disabled.jpg


METHOD ONE:
Through the Local Group Policy Editor:
NOTE: This is only available for the Vista Business, Ultimate, and Enterprise editions. See Method Two below for Vista Home Basic and Home Premium editions.

1. Open the Start Menu.
2. In the white line (Start Search) area, type gpedit.msc and press Enter.
3. Click Continue for the UAC prompt.
4. In the left pane, click on User Configuration, Administrative Templates, System. (See screenshot below)
5. In the right pane, right click on Prevent access to the command prompt and click Properties.

Group_Policy.jpg

6. To Enable Taskbar Context Menus -
A) Dot Disabled or Not Configured and click OK. (See screenshot below)
B) Go to step 8.

7. To Disable Taskbar Context Menus -
A) Dot Enabled.
B) Select Yes or No from the drop down menu to Disable or Allow Command Scripts (.cmd and .bat files) to run.
NOTE: Do not prevent the computer from running batch files (Command Scripts) if the computer uses logon, logoff, startup, or shutdown batch file scripts, or for users that use Terminal Services.

C) Click OK.

Properties.jpg

8. Close Local Group Policy Editor window. Your done.


METHOD TWO:
Through the Registry :
NOTE: This will work for all Vista versions.

Through a Download:
1. To Enable Command Prompt and Scripts -
A) Enable_Command_Prompt_and_Scripts.reg < Click To Download

2. To Disable Command Prompt Only -
A) Disable_Command_Prompt.reg < Click To Download

3. To Disable Command Prompt and Scripts -
A) Disable_Command_Prompt_and_Scripts.reg < Click To Download
NOTE: Do not prevent the computer from running batch files (Command Scripts) if the computer uses logon, logoff, startup, or shutdown batch file scripts, or for users that use Terminal Services.

4. Click on Save, and save the .reg file to the Desktop.
5. Right click the .reg (On Desktop) file and click Merge.
6. Click on the Run button for Security Warning pop-up.
7. Click on Continue (UAC), Yes, and then OK when prompted.
8. When done, you can delete the .reg file (On Desktop).


The Manual Way:
1. Open the Start Menu.
2. In the white line (Start Search) area, type regedit and press Enter.
3. Click the Continue button for the UAC prompt.
4. In regedit, go to: (See screenshot below)
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System
NOTE: If you do not have System in the left pane, then right click on Windows and click on New and Key. Type System and press Enter.

Reg1.jpg

5. To Disable the Command Prompt -
A) In the right pane, right click on a empty area and click New -> DWORD (32-bit) Value. (See screenshot above)
B) Type DisableCMD and press Enter.
C) Right click on DisableCMD and click Modify. (See screenshot below)

Reg2.jpg

D) To Disable Command Prompt Only - Type 2 and click OK. (See screenshots below)

Modify2.jpg
Reg4.jpg

E) To Disable Command Prompt and Scripts - Type 1 and click OK. (See screenshots below)
NOTE: Do not prevent the computer from running batch files (Command Scripts) if the computer uses logon, logoff, startup, or shutdown batch file scripts, or for users that use Terminal Services.

Modify1.jpg
Reg3.jpg

F) Go to step 7.

6. To Enable Command Prompt and Scripts -
A) In the right pane, right click on DisableCMD and click Delete. (See screenshot above)
B) Click Yes to confirm deletion.

7. Close regedit.


That's it,
Shawn
Published by
Brink's Avatar
Administrator
Join Date: Apr 2007
Location: Texas, USA
Posts: 13,545
Rep Power: 200
Brink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond repute

Tutorial Tools

Applies to
All Vista Versions
64 Bit & 32 Bit

Rating
Skill Level
40%40%40%
2

Page copy protected against web site content infringement by Copyscape

Comment

Tutorial Tools
Display Modes









Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008
Tutorial powered by GARS 2.1.8m ©2005-2006

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48