Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Forums > Tutorials

Vista - Command Prompt - Enable or Disable

Comment
 

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

Information
  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:EXAMPLE: Command Prompt Enabled
NOTE: The top screenshot is the normal command prompt, and the bottom screenshot is an elevated command prompt.
cmd_prompt_enabled.jpg
runas_cmd_prompt_enabled.jpg
EXAMPLE: Command Prompt Disabled
NOTE: You will see this message from both command prompts above when set as disabled.
command_prompt_disabled.jpg


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

2. In the left pane, click on User Configuration, Administrative Templates, and System. (See screenshot below)
group_policy.jpg
3. In the right pane, right click on Prevent access to the command prompt and click on Properties. (See screenshot above)

4. To Enable the Command Prompt and Scripts -
A) Select (dot) Disabled or Not Configured and click on OK. (See screenshot below 5C)

B) Go to step 6.
5. To Disable the Command Prompt -
A) Select (dot) Enabled.

B) Select Yes or No from the drop down menu to Disable or Allow Command Scripts (.cmd and .bat files) to still run.
WARNING: Do not prevent (disable) 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. They will not work afterwards if you do.

C) Click on OK.
properties.jpg
6. Close the Local Group Policy Editor window. Your done.



METHOD TWO:
Through the Registry
NOTE
  This method will work for all Vista versions.
Through a Download:
1. To Enable the Command Prompt and Scripts -
A) Click on the download button below to download the
Enable_Command_Prompt_and_Scripts.reg file.

B) Go to step 4.


2. To Disable the Command Prompt Only -
A) Click on the download button below to download the
Disable_Command_Prompt.reg file.

B) Go to step 4.


3. To Disable the Command Prompt and Scripts -
WARNING: Do not prevent (disable) 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. They will not work afterwards if you do.
A) Click on the download button below to download the
Disable_Command_Prompt_and_Scripts.reg file.


4. Click on Save, and save the .reg file to the Desktop.

5. Right click on the .reg file (on Desktop) and click on Merge.

6. Click on the Run button in the 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 on the Continue button in 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 on New and DWORD (32-bit) Value. (See screenshot above)

B) Type DisableCMD and press Enter.

C) Right click on DisableCMD and click on Modify. (See screenshot below)
reg2.jpg
D) To Disable Command Prompt Only - Type 2 and click on OK. (See screenshots below)
Name:  Modify2.jpg
Views: 6132
Size:  31.3 KB

reg4.jpg
E) To Disable Command Prompt and Scripts - Type 1 and click on OK. (See screenshots below)
WARNING: Do not prevent (disable) 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. They will not work afterwards if you do.
Name:  Modify1.jpg
Views: 6432
Size:  31.3 KB

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 on Delete. (See screenshot above)

B) Click on 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: 25,919
Rep Power: 150
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

Old 08-19-2008  
bennys


window vista
 
 

Re: Command Prompt - Enable or Disable

Please help me out here. What is the purpose of Command Prompt? I have read about it but I am still confused. This is the quote from one of the sites I read "This is how computers used to work before the mouse became common. You have to type in your commands". Then why do we use it still? since we already have a mouse to get to where we want. Please make it simple.
Thanks.

My System SpecsSystem Spec
Old 08-19-2008  
Brink


Vista x64 Ultimate SP2, Windows 7 Ultimate x64
 
 

Re: Command Prompt - Enable or Disable

Hi Bennys,

While the Windows GUI (interface) has made it a lot easier to work on computers than the old DOS days, the command prompt can still be very useful if you cannot use the GUI for a task for whatever reason. It oftens allow you to perform advanced actions that you normally may not be able to do. (Ex: More features for Disk Defragmenter) Plus, using an elevated command prompt will make doing certain tasks easier since it has high permission. This link will help explain the command prompt in more details though.

Search Results

Hope this helps,
Shawn
My System SpecsSystem Spec
Old 10-10-2008  
yl89


vista business
 
 

Re: Command Prompt - Enable or Disable

why is some most of my setting enabled when it is (not configured)
My System SpecsSystem Spec
Old 10-10-2008  
Brink


Vista x64 Ultimate SP2, Windows 7 Ultimate x64
 
 

Re: Command Prompt - Enable or Disable

Hello yl89,

In the Local Group Policy Editor, when something is set a (not configured), it usually indicates that that item is allowed (enabled) to run. Most Local Group Policies will disable or restict what the policy is for when they are Enabled. In the Local Group Policy Editor, these settings are strictly to Enable (to allow and enforce), Disable (not to allow ever), (not configured) (not allow, but let settings elsewhere in Vista decide instead) the policies.

Hope this helps,
Shawn
My System SpecsSystem Spec
Old 10-10-2008  
yl89


vista business
 
 

Re: Command Prompt - Enable or Disable

the problem is.since my system have always been (not configured) it have been running smoothly untill i have been hit with a trojan called "RONTOKBRO”and my acess to regedit have been denied untill i have cleared the trojan and enable regedit in gpedit and as you said.Some setting in vista have change it descision,and i hope i can change back the setting because i do dont know which shld be set disable or enable
My System SpecsSystem Spec
Old 10-10-2008  
Brink


Vista x64 Ultimate SP2, Windows 7 Ultimate x64
 
 

Re: Command Prompt - Enable or Disable

In the Local Group Policy Editor, everything is set to (not configured) by default. If it was not more than 90 days ago since your infection, it may be easier to do a System Restore using a restore point dated before the infection.
My System SpecsSystem Spec
Old 10-11-2008  
yl89


vista business
 
 

Re: Command Prompt - Enable or Disable

i did not save a restore point!
My System SpecsSystem Spec
Old 10-11-2008  
Brink


Vista x64 Ultimate SP2, Windows 7 Ultimate x64
 
 

Re: Command Prompt - Enable or Disable

Ok,

What did you need to get enabled again?

If it is the command prompt, where you able to use Method Two?
My System SpecsSystem Spec
Old 10-12-2008  
yl89


vista business
 
 

Re: Command Prompt - Enable or Disable

nevermind .you dont get what i mean.anyway thanks for replying
My System SpecsSystem Spec
Comment

Tutorial Tools


Similar Threads
Tutorial Category
Solved Make a command prompt run a command as soon as it opens? General Discussion
Keep getting prompt to enable option to send Microsoft information Live Mail
Command prompt "COPY" command not working in brand new Windows Vis Vista file management
Enable/Disable NIC from command line? Vista General
How to enable prompt to confirm shutdown/restart? Vista General


Vista Forums 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 Ltd
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