# How to install and use the Windows XP Recovery Console



## Jason (Jan 1, 2008)

I made this over at TST - original guide can be found HERE.

*Summary*


> To recover your operating system when your computer does not start correctly or does not start at all, you may want to install and use the Windows Recovery Console. However, Microsoft recommends this method of system recovery for advanced users only. Also, learn about the Recovery Console command prompt, command actions, rules, how to remove the Recovery Console, and how to install it during an unattended installation.


*Introduction*


> Microsoft recommends that you use the Recovery Console only after Safe mode and other startup options do not work. The Recovery Console is recommended only if you are an advanced user who can use basic commands to identify and locate problem drivers and files. Additionally, you must be an administrator to use the Recovery Console.


========================================

*How to install the Recovery Console*

To install the the Recovery Console; follow these steps:

1. Insert the Windows XP CD into the CD-ROM drive

2. Click Start, and then click Run.

3. In the Open box, type *X:\i386\winnt32.exe /cmdcons* where X is the drive letter for your CD-ROM drive. Below is an image to show this step:










4. Click ok, and you should see an image similar to the one below:










Just simply click the 'Yes' button to continue with the installation of the Recovery Console. It will then attempt to do a 'Dynamic Update' to make sure you have the latest files, as shown in the image below:










Allow it to continue and when it`s finished, you will be presented with a screen similar to the one below, telling you that the Windows Recovery Console has been installed.








5. Press the *OK* and remove the Windows XP CD from your computer.

Now, the next time your computer starts, you will have the option to start the Recovery Console.

*How to start the Recovery Console*

Once you have installed the Recovery Console on to your hard drive, follow the instructions below on how start it.

1. Reboot your computer and as Windows starts, you should see your startup options, as shown in the image below:








2. Now, with the arrow keys on your keyboard, select the *'Microsoft Windows Recovery Console'* and press enter.

3. The Recovery Console will now start and list your Windows installations. If you have just the one, simply press *1* and then *enter* to log on to your Windows installation. If you have multiple ones, you`d simply enter the number associated with the installation you`d like to work on.

4. Next, it will prompt you for the administrator`s password. Simply enter your password and press *enter*, if there is no password, just press enter.

5. Once you have entered your password and pressed enter, you should now be presented a *C:\Windows>* prompt and you can start using the Recovery Console.


----------



## Jason (Jan 1, 2008)

*How to use the Recovery Console*


> You can enable and disable services, format drives, read and write data on a local drive (including drives that are formatted to use the NTFS file system), and perform many other administrative tasks. The Recovery Console is particularly useful if you have to repair your computer by copying a file from a disk or CD-ROM to your hard disk, or if you have to reconfigure a service that is preventing your computer from starting correctly.


The following is a list of the available commands you can use in the Recovery Console. If you do not know what a certain command does, you can use the prefix *help* to get a more detailed explanation. For example: help chkdsk



*Attrib* - changes attributes on one file or subdirectory.


*Batch* - executes commands that you specify in the text file, Inputfile. Outputfile holds the output of the commands. If you omit the Outputfile parameter, output appears on the screen.


*Bootcfg* - modifies the Boot.ini file for boot configuration and recovery.


*CD (Chdir)* - operates only in the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources.


*Chkdsk* - The */p* switch runs Chkdsk even if the drive is not flagged as dirty. The */r* switch locates bad sectors and recovers readable information. This switch implies */p*. Chkdsk requires Autochk. Chkdsk automatically looks for Autochk.exe in the startup folder. If Chkdsk cannot find the file in the startup folder, it looks for the Windows 2000 Setup CD-ROM. If Chkdsk cannot find the installation CD-ROM, Chkdsk prompts the user for the location of Autochk.exe.


*Cls* - clears the screen.


*Copy* - copies one file to a target location. By default, the target cannot be removable media, and you cannot use wildcard characters. Copying a compressed file from the Windows 2000 Setup CD-ROM automatically decompresses the file.


*Del (Delete)* - deletes one file. Operates within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources. By default, you cannot use wildcard characters.


*Dir* - displays a list of all files, including hidden and system files.


*Disable* - disables a Windows system service or driver. The variable service_or_driver is the name of the service or driver that you want to disable. When you use this command to disable a service, the command displays the service's original startup type before it changes the type to SERVICE_DISABLED. Note the original startup type so that you can use the enable command to restart the service.


*Diskpart* - manages partitions on hard disk volumes. The */add* option creates a new partition. The */delete* option deletes an existing partition. The variable device is the device name for a new partition (such as \device\harddisk0). The variable drive is the drive letter for a partition that you are deleting (for example, D). Partition is the partition-based name for a partition that you are deleting, (for example: \device\harddisk0\partition1) and can be used instead of the drive variable. The variable size is the size, in megabytes, of a new partition.


*Enable* - enables a Windows system service or driver. The variable service_or_driver is the name of the service or driver that you want to enable, and start_type is the startup type for an enabled service. The startup type uses one of the following formats:

SERVICE_BOOT_START
SERVICE_SYSTEM_START
SERVICE_AUTO_START
SERVICE_DEMAND_START


*Exit* - quits the Recovery Console, and then restarts the computer.


*Expand* - expands a compressed file. The variable source is the file that you want to expand. By default, you cannot use wildcard characters. The variable destination is the directory for the new file. By default, the destination cannot be removable media and cannot be read-only. You can use the *attrib* command to remove the read-only attribute from the destination directory. The option */f:filespec* is required if the source contains more than one file. This option permits wildcard characters. The */y* switch disables the overwrite confirmation prompt. The */d* switch specifies that the files will not be expanded and displays a directory of the files in the source.


*Fixboot* - writes a new startup sector on the system partition.


*Fixmbr* - repairs the startup partition's master boot code. The variable device is an optional name that specifies the device that requires a new Master Boot Record. Omit this variable when the target is the startup device.


*Format* - formats a disk. The */q* switch performs a quick format. The */fs* switch specifies the file system.


*Help* - If you do not use the command variable to specify a command, help lists all the commands that the Recovery Console supports.


*Listsvc* - displays all available services and drivers on the computer.


*Logon* - displays detected installations of Windows and requests the local Administrator password for those installations. Use this command to move to another installation or subdirectory.


*Map* - displays currently active device mappings. Include the *arc* option to specify the use of Advanced RISC Computing (ARC) paths (the format for Boot.ini) instead of Windows device paths.


*MD (Mkdir)* - operates only within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources.


*More/Type* - displays the specified text file on screen.


*Rd (Rmdir)* - operates only within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources.


*Ren (Rename)* - operates only within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources. You cannot specify a new drive or path as the target.


*Set* - displays and sets the Recovery Console environment variables.


*Systemroot* - sets the current directory to %SystemRoot%.


----------



## Jason (Jan 1, 2008)

*How to delete the Recovery Console*

*Warning:* To remove the Recovery Console, you need to modify the boot.ini file. Take care in working this procedure, as modifying it incorrectly can prevent your computer from starting properly.

Follow the steps below to remove the Recovery Console:

1. Double-click on *My Computer* and then double-click on the drive you installed the Recovery Console to.

2. Click on the *tools* menu, then click *folder options*, and then click the *view* tab.

3. Select *Show hidden files and folders*, and uncheck *Hide protected operating system files*.

4. Now at the root folder, delete the *Cmdcons* folder and the *Cmldr* file.

5. At the root folder, right-click the *Boot.ini* file, and then click *Properties*.

6. Click to clear the *Read-only* check box, and then click *OK*.

7. Next, click on *Start*, then *Run* and type *Notepad.exe c:\boot.ini* in the Open field and press the *OK* button.

8. Remove the entry for the Recovery Console; It will look similar to this:
*C:\CMDCONS\BOOTSECT.DAT="Microsoft Windows Recovery Console" /cmdcons*

*ONLY* delete that entry.

11. Once deleted, click *file*, and then *save*.

12. Right click once again on the *boot.ini* file and select *properties*.

13. Put a checkmark back in the *Read-only* checkbox and then press the *OK* button.

The Recovery Console has now (Should of) been removed from your system.


----------



## WhitPhil (Oct 4, 2000)

Jason:

An excellent reference. 

Here is a good addition from *Elvandil*

An ISO that allows you to create a Recovery Console bootable CD


----------



## Jason (Jan 1, 2008)

No worries at all. 

Regards Jason


----------

