Professional Documents
Culture Documents
Page 1 of 3
Search Microsoft.com
Windows XP Home Windows XP Editions Home Edition Professional Media Center Edition Tablet PC Edition Professional x64 Edition Information For Home Users Students Small Businesses IT Professionals Developers Resources Using Windows XP Downloads Support Expert Zone Worldwide Sites Microsoft Update Windows Marketplace Windows Family
Published: March 1, 2004 By Joli Ballew, Windows XP Expert Zone Community Columnist Using Windows XP
Submit Query
Back in "the day", I was one of those people who enjoyed showing off my command line prowess to astonished friends and family. I even took an MS-DOS class in 1983 (keep the snickering down, please). The command line is a user interface to a computer's operating system, which allows the user to type commands and get responses directly from the system. Commands are entered at a command prompt, a symbol that indicates a command is expected. Generally a command prompt looks like this: C:\>. Depending on your age and level of technical expertise, you may have had a little experience in the command-line interface field yourself. As computers evolved, most users got away from the commandline tools and began depending solely on the graphical user interface. Recently I discovered the command line again, and to be honest, I'm feeling a little nostalgic. Yes Virginia, there really is a command line, and it's alive and well in Windows XP. Why would you use command-line tools when Windows XP already provides a graphical user interface to handle these tasks? There are many reasons for taking the time to learn how to work "under the hood" of the computer, among them:
Windows XP Command
Line Utilities
MyITforum:
Driverquery.exe
Using the command line often offers a faster way to perform a task, such as renaming multiple files or folders. Working from the command-line interface uses fewer resources than working from inside the graphical user interface. Creating powerful and multifaceted commands by stringing commands together is easily accomplished. Working from the command line may even inspire you to become a computer programmer!
You can use command line shortcuts to automate routine tasks, such as shutting down your system and viewing system information. They're also useful for scanning and repairing protected system files and identifying problems with a hard disk. For more information on the command line interface, read the definition at WhatIs.com. TechNet also provides good coverage in the Command Shell Overview.
In this column, I share some of my favorite command-line tools and shortcuts, including how to recover data, send a message to other computers on a network, and find a complete list of system drivers. It'll be great fun, and I promise not to let you foul anything up while we do it.
Figure 1
4.
On the Options tab, if desired, change the Cursor Size, Display Options, and Edit Options. (QuickEdit Mode lets you use your mouse to cut and paste, bypassing the Edit menu.) Don't make any changes to the Buffer Size settings. On the Font tab, if desired, change the Window Preview or Font. On the Layout tab, if desired, change the Screen Buffer Size, Windows Size, or Windows Position. On the Colors tab, if desired, change the Screen Text, Screen Background, Popup Text, or Popup Background colors. Click OK.
5. 6. 7.
Top of page
shutdown for shutting down the system convert for converting a FAT file system to NTFS
To get more information about any command, type command name /?. Then press Enter.
http://www.microsoft.com/windowsxp/using/helpandsupport/learnmore/ballew_commandli...
2/2/2011
Page 2 of 3
to the command-line to troubleshoot a problem, you'll want to know how this command works. To shut down the computer and experiment with other options: 1. 2. Close all open programs to avoid loss of data. Open Command Prompt from the shortcut created in the previous section or by clicking Start, pointing to All Programs, pointing to Accessories, and clicking Command Prompt. At the command prompt, type shutdown -s. Press Enter or Return on the keyboard. A shutdown dialog box opens. To abort the shutdown in progress, at the command prompt, type shutdown -a.
3. 4.
Other options include -r to restart the system, -m \\computername to shut down a remote computer, and -l to log off of the computer. To see all the options, type shutdown /? at the command prompt.
3.
You can also open a Command Prompt from the Run line (available from the Start menu). Just type cmd and press Enter.
Top of page
sfc for scanning, finding, and replacing missing protected system files driverquery for viewing a complete list of drivers and their properties chkdsk for scanning and repairing problems on a hard disk.
See Windows XP Command Line Utilities for a list of command prompts that work with Windows XP.
3. 4.
To format the information in a table: At a command prompt, type driverquery /fo:table, and then press Enter.
To format the information in a list: At a command prompt, type driverquery /fo:list, and then press Enter.
To format the information using comma-separated values: At a command prompt, type driverquery /fo:csv, and then press Enter.
At a command prompt, type driverquery /si. Figure 3 shows an example of signed driver information presented in a list.
http://www.microsoft.com/windowsxp/using/helpandsupport/learnmore/ballew_commandli...
2/2/2011
Page 3 of 3
Figure 3
There's a short but informative article about this command at MyITForum, by author Larry Duncan.
Figure 4
To repair errors with the disk, at a command prompt, type chkdsk /f/r and press Enter. The parameter /f fixes errors on the disk; /r locates bad sectors and recovers readable information. If you receive a message that Chkdsk can't run because the volume is in use by another process, this probably means you're trying to fix errors on the disk that you're currently using. You can't do that, but the computer can repair errors at startup, and you should schedule an appointment to do that. Note: If you have trouble with chkdsk running at system boot, download the chkdsk.exe update patch here.
Top of page
Bootcfguse this command to configure, query, or change the boot.ini file settings. Be careful about making changes here! Gpresultuse this command to test Group Policy and obtain general information about the operating system, the user, and the computer, including the build number and Service Pack details, user name, domain name, profile type, security privileges, disk quota information, and the last time a policy was applied. Recoveruse this command to recover readable information from a bad or defective disk. Schtasksuse this command to schedule programs to run at a specific time or at specified intervals.
To see a complete list of available commands for Windows XP, including the newest additions, check out the Command Line Reference page at Microsoft TechNet. Joli Ballew is a full-time writer and author of several books, including Microsoft Windows XP: Do Amazing Things (Microsoft Press) and Windows XP Professional: The Ultimate User's Guide, Second Edition (Paraglyph Press). In addition to writing, Joli teaches classes at Eastfield Community College and is an artist and network administrator at North Texas Graphics.
Manage Your Profile | Contact Us | Free Newsletter | RSS Feeds 2011 Microsoft Corporation. All rights reserved. Contact Us | Terms of Use | Trademarks | Privacy Statement
http://www.microsoft.com/windowsxp/using/helpandsupport/learnmore/ballew_commandli...
2/2/2011