- Command Prompt For Windows Xp Repair
- Cmd Commands Windows Xp
- Dos Commands For Windows Xp
- Chkdsk Command For Windows Xp
Note: This article is now available on the Amazon Kindle Bookstore: Repairing Windows XP in Eight Commands. Download a convenient e-book version of this article to keep at your side while you repair your computer. Every IT tech from casual to professional should have a copy of this handy reference.
Command Prompt is one of the command-line interface programs used to execute commands in Windows operating systems.
Some popular Command Prompt commands you might have heard of include ping, netstat, tracert, shutdown, and attrib, but there are many more. We have a complete list here.
While Command Prompt probably isn't a tool most of you will use on a regular basis, it can really come in handy now and then, maybe to troubleshoot a specific Windows problem or to automate some kind of task.
How you open Command Prompt differs between Windows versions, so you'll find steps below for Windows 10, Windows 8 or Windows 8.1, and Windows 7, Windows Vista, and Windows XP. See What Version of Windows Do I Have? if you're not sure.
- This Minecraft tutorial explains how to use the /xp command to increase your experience points with screenshots and step-by-step instructions. If you want a quick way to gain experience points or even experience levels in the game, you can use the /xp command to add as much experience as you need.
- Command-line options for msiexec.exe for Windows Installer 3.0 and earlier. Provides a table showing options, parameters, and descriptions. Examples showing how to install products and other tasks.
Open Command Prompt in Windows 10
Click or tap Command Prompt from the list.
Another way to open Command Prompt in Windows 10 is to look in its Start menu folder:
Select the Start button.
Find the Windows System folder from the list of apps and tap or click it.
Click or tap Command Prompt under the Windows System folder.
One more method for opening Command Prompt in Windows 10 is through the Power User Menu. If you're using a keyboard or mouse, choose Command Prompt from the menu that appears after pressing Win+X or right-clicking the Start button.
You might see Windows PowerShell options in the Power User Menu instead of Command Prompt. In more recent versions of Windows 10, Command Prompt has been replaced by PowerShell, but you can still access it from the Power User Menu by editing the taskbar settings.
Open Command Prompt in Windows 8 or 8.1
Swipe up to show the Apps screen. You can accomplish the same thing with a mouse by clicking on the down arrow icon at the bottom of the screen.
Prior to the Windows 8.1 update, the Apps screen can be accessed from the Start screen by swiping up from the bottom of the screen, or right-clicking anywhere, and then choosing All apps.
If you're using a keyboard or mouse, a really quick way to open a Command Prompt window in Windows 8 is through the Power User Menu—just hold the WIN and X keys down together, or right-click the Start button, and choose Command Prompt.
Swipe or scroll to the right on the Apps screen to locate the Windows System section heading.
Tap Command Prompt under Windows System.
A new Command Prompt window will open on the Desktop.
You can now execute whatever command you needed to run. See our List of Windows 8 Command Prompt Commands for a complete list of the commands available through Command Prompt in Windows 8, including short descriptions and links to more in-depth information if we have it.
Open Command Prompt in Windows 7, Vista, or XP
Click Start (Windows XP) or the Start button (Windows 7 or Vista).
In Windows 7 and Windows Vista, it's a bit faster to enter command in the search box at the bottom of the Start Menu and then click Command Prompt when it appears in the results.
Use Command Prompt to execute commands. Here's our List of Windows 7 Commands, List of Windows Vista Commands, and List of Windows XP Commands if you need a command reference for any of those versions of Windows.
Elevated Command Prompts and Old Windows Versions
In versions of Windows released before Windows XP, like Windows 98 and Windows 95, Command Prompt does not exist. However, the older and very similar MS-DOS Prompt does. This program is located in the Start Menu, and can be opened with the command run command.
Some commands, like the sfc command that's used to repair Windows files, require that Command Prompt be opened as an administrator before they can be executed. You'll know if this is the case if you get a 'check that you have administrative rights', '... command can only be executed from an elevated command prompt', or 'you must be an administrator' message after trying to execute the command.
See How to Open an Elevated Command Prompt for help starting Command Prompt as an administrator, a process that's a bit more complicated than what's outlined above.One of the most basic tasks involved in using computers is managing disks. Partitioning, formatting, defragmenting, and creating volumes are all skills that help a computer user or technician optimize the way storage space is used by the system and organize the data, system, and application files that are stored on the disk. We’ve come a long way since the DOS days when the FDISK command was the primary means of managing disks.
Windows XP includes a variety of tools to help you manage your physical and logical disks. The graphical disk management utility (part of the Computer Management MMC) is the most obvious, but many XP users don’t realize that they also have powerful command line utilities at their service. The most versatile of these is diskpart.exe, a command interpreter that allows you to do, at the command line, most of the same disk management tasks that you can perform with the Disk Management console—and more.
Command line vs. GUI
Why use a command line tool when there’s a perfectly good graphical interface at your disposal? Many experienced users find the command line faster, since your hands can stay on the keyboard and there’s no need for mouse clicking. But the most important reason to master the command line administrative utilities, such as DiskPart, is the ability to write scripts that can automate tasks. For example, you might want to create a script to be used during an unattended setup to partition the disk and create additional volumes on the system (only the boot volume is normally created during the unattended setup process).
Command Prompt For Windows Xp Repair
A script is a text file that you start by using the diskpart /s command, with the scriptname following, as in:
Diskpart /s scriptname.txt
You can also use the noerr parameter to direct DiskPart not to stop processing the script if it encounters an error (which it does by default). The noerr parameter can be added to the end of most of the commands I’ll discuss (it should be used only in scripts, not when you are entering commands directly).
Even if you use the noerr parameter, DiskPart will still give you an error message if you get the command syntax wrong.
If you want to add comments to your script, you can use rem to set off the text that you don’t want to be processed.
Perhaps the most important (and the only ”tricky”) thing to know about using the DiskPart utility is how to put the “focus” on an object. The objects that can be managed by the DiskPart utility are disk objects: disks, partitions, and volumes. Some of the actions you can perform on them include:
- Removing all partitioning and formatting information
- Assigning and removing drive letters and mount points
- Converting from basic to dynamic
- Creating volumes (XP supports only simple, spanned, and striped volumes, not fault tolerant volumes)
- Extending volumes
There are a few commands that allow you to do things you can’t do with the GUI, such as creating an EFI (Extensible Firmware Interface) partition or a GUID partition table (GPT) for Itanium-based computers when you’re running the 64-bit version of XP, and preparing a dynamic simple volume to be used as the boot or system volume during unattended setup. Additionally, you can delete OEM MBR partitions with DiskPart—something you can’t do with the Disk Management console.
DiskPart was also available for Windows 2000, but it was not installed by default. You had to download it as part of the Resource Kit.
DiskPart allows you to list and manage IDE, SCSI, USB, and IEEE 1394 (FireWire) disks. Removable drives (such as zip/jaz drives or flash card devices) are not included.
The first step in using DiskPart is to list the available disk objects and then select one on which to focus. First, use the list disk command to select the disk on which you want to work (assuming you have more than one physical disk installed in the computer), and then use the list partition command to see the partitions on that disk and select one. The list partition command won’t work if you haven’t selected a disk first.
You can also use the list volume command to see the volumes on all the disks. This provides information such as the drive letter assigned to each volume, its label, the file system in which it’s formatted, size, health status, and whether it is a system or boot volume, as shown in Figure A. This does not tell you which physical disk each volume is on.
|The list volume command displays information about all volumes on all disks.|
If you do want to know which volumes are on a particular disk, you can use the detail disk command to find out. This command provides details—including manufacturer/model number, ID, type, and volume information—about the disk on which the focus is placed.
Using the detail partition and detail volume commands, you can also view detailed information about partitions and volumes.
Placing the focus on an object
When you initially list the disks, no disk has focus. Here’s the tricky part (or at least, the part that you have to dig down into the Help file to figure out): To put the focus on an object, you use the select disk, select partition, or select volume command. The syntax is:
Select disk/partition/volume <number>
After you select an object, it will appear with an asterisk (*) to indicate that the focus is on it, as shown in Figure B, where I have selected disk 2.
|After you use select disk to place the focus on an object, it is marked with an asterisk (*).|
After you’ve selected a disk, you can select a partition on that disk, using the select partition command, as shown in Figure C. As you can see, when you list partitions, both the extended partition and the logical drives within that partition are shown as partitions.
|Logical drives within the extended partition are also shown as partitions.|
You can change the focus explicitly with the select command, but some operations that you perform can implicitly change the focus. For example, if you change the volume focus to a volume that is on a different disk from the disk the focus is on, the disk focus changes to the disk on which the selected volume is located.
Now that you know how to list and select objects, let’s look at what you can do with them.
Cmd Commands Windows Xp
Windows XP computers support both basic and dynamic disks. Basic disks are divided into partitions. Dynamic disks use volumes (a disk can be divided into volumes, or a volume can span multiple disks).
You can use the convert command to change a disk from basic to dynamic or vice versa. When you convert a disk from dynamic to basic, it must be empty, but a disk with data and partitions can be converted from basic to dynamic. Put the focus on the disk you want to convert and type convert dynamic or convert basic.
You can also change a disk from MBR to GPT or vice versa with the convert mbr or convert gpt command. The disk cannot have data or partitions on it for either of these conversions. You can convert a disk to GPT only if it is installed on an Itanium computer.
Creating and extending partitions and volumes
There are five create partition commands that can be used to create new partitions on the disk that is in focus. They are:
create partition primary
create partition extended
create partition logical
create partition efi
create partition msr
With any of these, you use the size=n and offset=n parameters to set the size and offset for the partition. The size is entered in megabytes and the offset refers to where on the disk to place the partition. If you don’t enter a size, the partition will use all the contiguous free space that is available. If you don’t enter an offset, the partition will be placed in the first free contiguous disk space that is big enough to hold it.
An EFI partition is used by the Extensible Firmware Interface, a new environment for booting the OS that is intended to replace the BIOS. An EFI partition is required on Itanium computers running Windows XP 64-bit edition. An MSR partition is a Microsoft-reserved partition. An MSR partition is required on GPT disks (also on Itanium computers).
On dynamic disks, you can create three types of volumes on XP computers:
- Simple volumes: Contains disk space from a single physical disk
- Spanned volumes: Extends across two or more physical disks
- Striped volumes: Also known as RAID 0, combines equal sized areas of space on multiple physical disks, increasing performance
Windows XP does not support fault tolerant volumes (mirrored or RAID 1 volumes and RAID 5 volumes). DiskPart can be used to create RAID 1 and RAID 5 volumes on Windows 2000 Server and Windows Server 2003 computers.
Use the following create volume commands to create new volumes on dynamic disks:
create volume simple
create volume stripe
In addition to specifying the size (size=n), you’ll need to specify the disk number on which the volume is to be created (disk=
Dos Commands For Windows Xpn). If you don’t set a size for a simple volume, it will use whatever contiguous free space is available. If you don’t set a size for a striped volume, it will make the stripes the size of whatever free space is available on the disk with the smallest amount of free space. There is no offset for volumes on dynamic disks.
To create a spanned volume, use the extend command to extend a simple volume to another disk. The syntax is:
extend disk=n size=n
Partitions and volumes can be removed by using the delete partition and delete volume commands.
Chkdsk Command For Windows XpDiskPart, like the GUI Disk Manager, will not let you delete the system or boot partition or a partition on which an active paging file is located.
Other disk management tasks
When you create a partition with DiskPart, it does not automatically assign a drive letter. To assign it a drive letter, you need to use the assign command. You can specify a drive letter with the command (assign letter=<driveletter>) or if you use the command alone, it will assign the next drive letter that is available. You can also use assign to assign a mount point, using the mount=<path> parameter.
You can remove a drive letter or mount point using the remove command. If you don’t specify a letter or path, the first one DiskPart finds on the volume with the focus will be removed. You can also use the all parameter if you want to remove all drive letters and mount points.
You can set a partition as active by changing the focus to the partition you want to make active and using the active command. You should set a partition as active only if it contains the files required to boot an OS; otherwise, the computer won’t boot into the OS after you make the change.
Now, if you want to undo everything you’ve done and remove all the partition or volume formatting, you can use the clean command. Be careful with this one; it will overwrite the master boot record (MBR) or, on GPT disks, the Guid Partition Table. If you want to go further and delete all the data, overwriting every sector on the disk with zeros, use the clean all command.
There are other commands available in DiskPart, such as the online command that is used to bring an offline disk online, and the import command that allows Windows XP to recognize a “foreign” disk that has been installed and make it a member of the computer’s disk group. However, the commands described above are the ones you’re likely to use most often.
Finally, when you’re finished with DiskPart, the exit command will take you back to the command prompt.
The graphical interface is great, but when you need a fast way to do disk management or you want to script disk management tasks, the command line DiskPart utility is an invaluable tool.