How to use the Windows XP Recovery Console

NetRyder

Tech Junkie
Joined
19 Apr 2002
Messages
13,256
There is a common misconception that NTFS volumes cannot be accessed from the command line, and that you're in a mess if you can't boot into XP.
This is not true. The Windows XP Recovery Console can be used to modify files from the command line if you can't boot into Windows, even on NTFS partitions. This guide describes how the Recovery Console can be used.

What can you do from the Recovery Console?
You can enable and disable services, format drives, repair the boot record, read and write data on a local drive (including drives that are formatted to use the NT File System (NTFS), and perform many other administrative tasks.

NOTE: By default, the Recovery Console allows you to access only the root folder, the WINDOWS folder (and it's subfolders), and removable drives such as the CD-ROM. Also, it will not allow you to copy files to removable media such as floppies. However, you can make some changes that will allow you to access all folders on your drives, as well as copy files to removable media. Follow the steps below:

Allow Access to all folders and removable media:
1. Click Start, click Run, type mmc in the Open box, and then click OK.
2. On the File menu, click Add/Remove Snap-in, and then click Add.
3. Click Group Policy, and then click Add.
4. Click Local Computer, click Finish, and then click Close to return to the Add/Remove Snap-in dialog box.
5. Click OK to return to the Console window.
6. Expand the Local Computer Policy object to Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options.
7. Select the Security Options object in the Console pane to display the security policies in the Details pane.
8. In the Details pane, double-click the Recovery Console: Allow Floppy Copy And Access To All Drives And Folders policy.
9. Click Enabled, and then click OK.

How to get into the Recovery Console:
1. Insert the Windows XP CD-ROM into the CD-ROM drive, and then restart the computer. Click to select any options that are required to start the computer from the CD-ROM drive if you are prompted to do so.
2. When the "Welcome to Setup" screen appears, press R to start the Recovery Console.
3. When the Recovery Console menu is displayed, a numbered list of the Windows installations on the computer is displayed (usually only one entry-c:\Windows-exists). Press a number before you press ENTER, even when only one entry appears. If you press ENTER without choosing a number, the computer restarts and begins the process again.
4. When you are prompted to do so, type the Administrator password. If the administrator password is blank, just press ENTER.

If you followed the steps above to allow access to all folders and removable media, you need to perform one extra step. At the command prompt type:
set AllowAllPaths = TRUE
set AllowRemovableMedia = TRUE
set AllowWildCards = TRUE

Make sure there is a space before and after the = sign, or you will encounter a syntax error!

List of commands that can be used in the Console:
For a list of commands that are available in Recovery Console, type help at the command prompt, and then press ENTER.
For information about a specific command, type help <commandname> at the command prompt, and then press ENTER.

Here's a list of commands that can be used:
* 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 is displayed on the screen.
* Bootcfg is used to manipulate the Boot.ini for boot configuration and recovery.
* CD (Chdir) 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.
* 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 (or boot) 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, it 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 wildcards. 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. You cannot use wildcards by default.
* 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, it displays the service's original startup type before changing the type to SERVICE_DISABLED. You should 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 in place of the drive variable. The variable size is the size, in megabytes, of a new partition.
* Enable enables a Windows system service or driver.
* Fixboot writes a new boot sector on the system partition.
* Fixmbr repairs the boot partition's master boot code. The variable device is an optional name that specifies the device that needs a new MBR; omit this variable when the target is the boot 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 (or Type) displays the specified text file (such as, filename) on screen.
* Net Use connects to a remote share for the Windows XP Recovery Console.
* 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%.

Sources: Microsoft Knowledge Base articles and other websites.
 
Thanks to Perris for the reminder, and to [e]-punk for salvaging my old post from what was left of the vB2 database. :)
So here it is again...
 
Excellent post. Should help out a lot of people.
 
great job netryder

those of you with hands on experience, anything to add, feel free to contrubute
 
Since XP Home does not include the Group Policy Editor (gpedit.msc), you need to edit the following registry key in order to enable "Allow Floppy Copy And Access To All Drives And Folders"

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SeCEdit\Reg Values\MACHINE/Software/Microsoft/Windows NT/CurrentVersion/Setup/RecoveryConsole/SetCommand

Change ValueType to 2.
 
Dont forget that the SET command is disabled in XP home, so you need to change SetCommand from 0 to 1 in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole


then you can access floppy drives with

set AllowRemovableMedia = true
 
Many thanks for this. I had a problem with a corrupted file the other day, and I reckon using the recovery concole would've saved some time (and hassle).
 
NetRyder: Thanks for the article. I can't find much that ($) NTFSDosPro can do that can't be done with RC. FYI this also works in W2000, W2000 Server, and W2003 Server. To allow access to all folders and removable media is a little different than your article, but anyone who needs this in these operating systems will figure how to implement.
 
Might have to test this later ... system has upset me today so ... ::devil::
 
Thanks NetRyder!! Good grief I sure could have used that info about a month ago when I went to XP heck and back, this is good stuff and I printed and saved it in my desk drawer. Thanks again! :)
 
Zooker said:
Thanks NetRyder!! Good grief I sure could have used that info about a month ago when I went to XP heck and back, this is good stuff and I printed and saved it in my desk drawer. Thanks again! :)

Hehe, yeah...the recovery console can be a life-saver in certain situations. Glad you found the guide useful
smile.gif

And like EP said, welcome back!
 
You can install the recovery console onto the startup menu.

Click Start, click Run, and then type CD-ROM drive letter:\i386\winnt32.exe /cmdcons in the Open box, where CD-ROM drive letter is the drive letter assigned to your CD-ROM drive.

Click OK, follow the instructions on the screen to finish Setup, and then restart your computer.

Edit: How to remove it can be found here
 
I'm having trouble figuring out my own Admin password so I can run the Windows Recovery Console. I'm running Windows XP Home.

The first thing I tried was going to my control panel, user settings, and I updated my password for my main login account, which has admin priviledges. I rebooted and tried logging into the Recovery Console, and no luck with the new password.

Then I tried rebooting in safe mode, and I updated the password setting on the default named Administrator account. Reboot. The Recovery Console still doesn't like the password.

???

Any idea what I should try?
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back