│   │   │   │ 
Recovery Console Commands at a glance:

attrib
batch
bootcfg
cd
chdir
chkdsk
cls
copy
del
delete
dir
disable
diskpart
enable
exit
expand
fixboot
fixmbr
format
help
listsvc
logon
map
md
more
mkdir
rd
ren
rename
rmdir
set
systemroot
type
 

 

Recovery Console in Windows XP (Part III)

Topics on this page (continued from Part II):

Disc management commands (continued): format, map

Replace files: copy and expand

Enable or disable services and drivers: enable and disable

 

 

Disc Management commands (continued)

Format

A familiar command dating from MS-DOS, this command includes the ability to format NTFS volumes (fig. 6). Quote from KB:

format drive: /Q /FS:file-system

Use this command to format the specified drive to the specified file system. In the command syntax, /Q performs a quick format of the drive, drive is the drive letter of the partition to format, and /FS:file-system specifies the type of file system to use [FAT, FAT32, or NTFS]. If you do not specify a file system, the existing file system format is used, if it is available.

Format command

Fig. 6. Format command.

 

map

This commands displays information only. Quote from KB:

map arc

Use this command to list drive letters, file system types, partition sizes, and mappings to physical devices. In the command syntax, arc parameter tells the map command to use ARC paths instead of Windows Device paths.

Map command

Fig. 7. Map command

 

Replace files

Copy and Expand

The expand command uncompresses a file, such as a cab file from the Windows XP CD to replace a damaged system file (fig. 8). The file would be in the i386 folder on the CD. You don't need to use "expand" if it's not a cab file but a compressed file with DL_ or EX_ extensions: just use the copy command and the file will be uncompressed automatically. Contrary to some users' believe, you don't need to use WinZip or WinRar at all.

Quote from KB article:

expand source [/F:filespec] [destination] [/y]

expand source [/F:filespec] /D

Use this command to expand a file. In the command syntax, source specifies the name of the file to be expanded and destination specifies the folder for the new file. If you do not specify a destination, the command defaults to the current folder. You cannot include wildcard characters.

You can use the following options:

/y : Do not prompt before overwriting an existing file.
/f  : filespec : Identifies the files to be expanded.
/d : Do not expand; display only a directory of the files in the source.

If the source contains more than one file, the /f:filespec parameter is required to identify the specific files to be expanded. You can include wildcard characters.

The destination can be any folder in the system folders of the current Windows installation, in the root of the drive, in the local installation sources, or in the Cmdcons folder. The destination cannot be removable media, and the destination file cannot be read-only. Use the attrib command to remove the read-only attribute.

Unless you use the /y option, the expand command prompts you if the destination file already exists.

 

expand command options

Fig. 8. Expand command options.

 

Commands to enable or disable services and drivers

These include: Listsvc, Enable (fig. 9) and Disable (fig. 10).

Quote from KB article:

The listsvc command lists all available services, drivers, and their start types for the current Windows installation. This command is useful in conjunction with the disable and enable commands.

Note that the list is extracted from the %SystemRoot%\System32\Config\System hive. If the System hive is damaged or missing, results are unpredictable.

enable servicename start_type

You can use the enable command (where servicename is the name of the service or driver to be enabled) to enable a Windows system service or driver.

Use the listsvc command to display all eligible services or drivers to enable. The enable command prints the old start type of the service before resetting it to the new value. You should note the old value, in case it is necessary to restore the start type of the service.

Valid options for start_type are:

SERVICE_BOOT_START
SERVICE_SYSTEM_START
SERVICE_AUTO_START
SERVICE_DEMAND_START
 

Note that if you do not specify a new start type, the enable command prints the old start type for you.

Enable command

Fig. 9. Enable command.

 

The Disable command does the opposite to a system service or driver.

Disable command

Fig. 10. Disable command.

 

Net

Quote from KB article:

Although the Help file states otherwise, the NET command is not usable from the Recovery Console. The protocols stack is not loaded for the Recovery Console, so there is no networking function available.

 

 

Go to TOP

Go back to Part 2.

 

Reference

KB 314058 Description of the Windows XP Recovery Console

 

Copyright © 2003-2004 by Kilian. All my articles including graphics are provided "as is" without warranties of any kind. I hereby disclaim all warranties with regard to the information provided. In no event shall I be liable for any damage of any kind whatsoever resulting from the information. The articles are provided in good faith and after some degree of verification but they may contain technical or typographical errors. Links to other web resources may be changed at any time and are beyond the control of the author. Articles may be added, removed, edited or improved at any time. No support is provided by the author.

This is not an official support page for any products mentioned. All the products mentioned are trademarks of their companies.

Created 5 Mar 2004; last updated 2 Jul 2004