Programming4us
         
 
 
Windows

Windows 7 : Getting to the Command Line (part 1)

12/5/2010 11:43:50 AM
To take advantage of the command line and all its many useful commands, you need to start a Command Prompt session. Windows 7 offers a number of different ways to do this, but perhaps the easiest is to select Start, type command, and then click Command Prompt in the search results. (It’s even faster to type just cmd in the Search box and then press Enter.) Windows 7 opens a Command Prompt window like the one shown in Figure 1.
Figure 1. Use the Command Prompt window for your Windows 7 command-line adventures.


  • It’s also possible to configure Windows 7’s Folder file type to open the Command Prompt in Windows Explorer’s current folder.

Running Command Prompt as the Administrator

Once in a while, you not only need to start a Command Prompt session, but you need to start an elevated session. That’s because there are certain Windows commands and utilities that require administrator-level permission. This is normally handled by User Account Control, which prompts you for administrator credentials before letting you continue with the operation. However, this is usually not the case with operations launched from the Command Prompt.

For example, in this article, “Customizing Startup and Shutdown,” you learn how to use the BCDEDIT tool to edit the Windows 7’s Boot Manager. This tool requires administrator permissions, but you run it from the Command Prompt, so UAC doesn’t come into play. To use BCDEDIT (or any Command Prompt utility or command that requires elevation) successfully, you need to run it within a Command Prompt session that has been elevated to administrator status. Here’s how it’s done:

1.
Select Start and type command in the Search box. The Command Prompt icon appears in the search results.

2.
Right-click Command Prompt and then click Run as Administrator. UAC prompts you for your credentials.

3.
Enter your administrator credentials to continue.

In this case, the Command Prompt window still appears, but the title bar reads Administrator: Command Prompt to remind you that you’re in an elevated session (see Figure 2).

Figure 2. When you launch an elevated Command Prompt session, Windows includes Administrator: in the window title bar.


Note

When you start your computer using the Safe Mode with Command Prompt startup option, the Command Prompt session you get is an administrator session.


Other -----------------
- Windows Azure : Programming Access Control Service (part 10) - Deploying the Web Service in Windows Azure
- Windows Azure : Programming Access Control Service (part 9) - Configuring a Web Service Client to Acquire and Send SAML Tokens
- Windows Azure : Programming Access Control Service (part 8)
- Windows Azure : Programming Access Control Service (part 7) - Integrating ACS with a SAML Token Provider
- Windows Azure : Programming Access Control Service (part 6)
- Windows Azure : Programming Access Control Service (part 5)
- Windows Azure : Programming Access Control Service (part 4)
- Windows Azure : Programming Access Control Service (part 3)
- Windows Azure : Programming Access Control Service (part 2)
- Windows Azure : Programming Access Control Service (part 1)
- Windows 7 : Working with Registry Entries (part 3)
- Windows 7 : Working with Registry Entries (part 2)
- Windows 7 : Working with Registry Entries (part 1) - Changing the Value of a Registry Entry
- Windows 7 : Keeping the Registry Safe
- Windows 7 : Getting to Know the Registry (part 2)
- Windows 7 : Getting to Know the Registry (part 1) - Understanding Registry Settings
- Windows 7 : Firing Up the Registry Editor
- Windows Azure : Managing Access Control Service Resources (part 2)
- Windows Azure : Managing Access Control Service Resources (part 1)
- Windows Azure : Access Control Service Management Portal
 
 
Most View
- Recovering from a Disaster in an Exchange Server 2010 Environment - Recovering from a Boot Failure
- Windows Server 2008 : Understanding the Windows AIK (part 4) - Understanding ImageX and the .wim File Format
- Configuring SQL Server 2008 : Full-Text Indexing
- Windows 7 : Setting Security Permissions on Files and Folders (part 5) - Assigning Special Permissions
- SharePoint 2010 : Choose a Column Type (part 7)
- Windows Home Server 2011 : Controlling Services (part 2) - Controlling Services at the Command Prompt, Controlling Services with a Script
- What's New in SharePoint 2013 (part 1) - THE PROGRAMMING MODEL
- Windows Server 2008 : Monitoring System Performance (part 1) - Key Elements to Monitor for Bottlenecks
- SharePoint 2010 : Choose a Column Type (part 9)
- Scripting Windows 7 with WSH : Programming the WshNetwork Object
Top 10
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 3) - Configuring Recipient Filtering
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 2)
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 1)
- Implementing Edge Services for an Exchange Server 2007 Environment : Installing and Configuring the Edge Transport Server Components
- What's New in SharePoint 2013 (part 7) - BCS
- What's New in SharePoint 2013 (part 6) - SEARCH
- What's New in SharePoint 2013 (part 6) - WEB CONTENT MANAGEMENT
- What's New in SharePoint 2013 (part 5) - ENTERPRISE CONTENT MANAGEMENT
- What's New in SharePoint 2013 (part 4) - WORKFLOWS
- What's New in SharePoint 2013 (part 3) - REMOTE EVENTS