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