You are here: Home Guides & Tutorials Software Guides Recovery Console commands

PC Offensive

Recovery Console commands

E-mail Print PDF

Recovery Console commands are different to the Command Prompt commands. Here is a list of the commands you can use in the recovery console:

Attrib
Description: Changes the attributes of a file or directory.
Usage: attrib [+r|-r] [+s|-s] [+h|-h] [+c|-c] [[drive:][path] filename]
+r: Sets the read-only file attribute.
-r: Clears the read-only file attribute.
+s: Sets the system file attribute.
-s: Clears the system file attribute.
+h: Sets the hidden file attribute.
-h: Clears the hidden file attribute.
+c: Sets the compressed file attribute.
-c: Clears the compressed file attribute.
[[drive:][path] filename]: Specifies the location and name of the directory or file you want to process. You can change attributes for only one file or directory at a time.

Batch
Description: Executes the commands specified in the text file.
Usage: batch input_file [output_file]
input_file: Specifies the text file that contains the list of commands to be executed. Input_file can consist of a drive letter and a colon, a directory name, a file name, or a combination.
output_file: If specified, stores the output of the commands in the named file. If not specified, the output is displayed on the screen.
Example: batch c:\jobs\find.txt c:\jobs\results.txt

Bootcfg
Description: Boot file (boot.ini) configuration and recovery.
Usage: bootcfg /default: Set the default boot entry.
bootcfg /add: Add a Windows installation to the boot list.
bootcfg /rebuild: Iterate through all Windows installations and allow the user to choose which to add.
bootcfg /list: List the entries already in the boot list.
bootcfg /disableredirect: Disable redirection in the boot loader.
bootcfg /redirect [PortBaudRrate] | [useBiosSettings]: Enable redirection in the boot loader with the specified configuration.
Example: bootcfg /redirect com1 115200
Example: bootcfg /redirect useBiosSettings

ChDir (Cd)
Description: Displays the name of the current directory or changes the current directory.
Usage: chdir [drive:][path] [..] -or- cd [drive:][path] [..]
Example: cd c:/Windows/System32

Chkdsk
Description: Checks a disk and displays a status report.
Usage: chkdsk [drive:] [/p] [/r]
drive: Specifies the drive that you want chkdsk to check.
/p: Performs an exhaustive check even if the drive is not marked for chkdsk to run. This parameter does not make any changes to the drive.
/r: Locates bad sectors and recovers readable information. Implies /p.

Cls
Description/: Clears the screen.
Usage: cls
Example: cls

Copy
Description: Copies a single file to another location.
Usage: copy source [destination]
source: Specifies the location and name of the file to be copied. Source can consist of a drive letter and colon, a directory name, a file name, or a combination.
destination : Specifies the location and name of a file or set of files to which you want to copy. Destination can consist of a drive letter and colon, a folder name, a file name, or a combination.

Delete (Del)
Description: Deletes one or more files.
Usage: delete [drive:][path] filename -or- del [drive:][path] filename [drive:][path] filename: Specifies the location and name of the file you want to delete.

Dir
Description: Displays a list of files and subdirectories in a directory.
Usage: dir [drive:][path][filename]
[drive:][path]: Specifies the drive and directory for which you want to see a listing.
[filename]: Specifies a particular file or group of files for which you want to see a listing. Multiple file names can be used.
File names can be separated by spaces, commas, or semicolons. You can use wildcard characters (? and *) in the filename parameter to display a group of files.

Disable
Description: Disables a system service or a device driver.
Usage: disable {[service_name] | [device_driver_name]}
service_name: The name of the system service you want to disable.
device_driver_name: The name of the device driver you want to disable.
Example: disable eventlog

Diskpart
Description: Manages partitions on your hard drives.
Usage: diskpart [/add | /delete] [device_name | drive_name | partition_name] [size] /add: Creates a new partition.
/delete: Deletes an existing partition.
device_name: The device on which you want to create or delete a partition. The name can be obtained from the output of the map command. An example of a device name is: \Device\HardDisk.
drive_name: The partition you want to delete, by drive letter. Used only with /delete. An example of a drive name is: D:.
partition_name: The partition you want to delete, by partition name. Can be used in place of the drive_name. Used only with /delete. An example of a partition name is: \Device\HardDisk0\Partition1
size: The size, in megabytes (MB), of the partition you want to create. Used only with /add.
Example: diskpart /delete \Device\HardDisk0\Partition3
Example: diskpart /delete F:
Example: diskpart /add \Device\HardDisk0 20

Enable
Description: Starts or enables a system service or a device driver.
Usage: enable {service_name | device_driver_name} [startup_type]
service_name: The name of the system service you want to enable.
device_driver_name: The name of the device driver you want to enable.
startup_type: The startup type that you want to designate for the service or device driver. Valid startup types are: SERVICE_BOOT_START, SERVICE_SYSTEM_START, SERVICE_AUTO_START, SERVICE_DEMAND_START
Example: enable eventlog service_auto_start

Exit
Description: Exits the Recovery Console and restarts your computer.
Usage: exit
Example: exit

Expand
Description: Extracts a file from a compressed file.
Usage: expand source [/F:filespec}] [destination] [/d] [/y]
source: Specifies the file to expand. Use this if the source file contains a single file. Source can consist of a drive letter and a colon, a directory name, a file name, or a combination. You cannot use wildcard characters.
/f:filespec: If the source contains more than one file, this specifies the name of the file you want to extract. You can use wildcards for the files you want to extract.
destination: Specifies both the destination directory and file name for the extracted file, or each individually.
/d: Lists the files contained in the cabinet file without expanding it or extracting from it.
/y: Suppresses the overwrite prompt when expanding or extracting files.
Example: expand d:\i386\driver.cab /f:msgame.sys c:\Windows\system\drivers
Example: expand d:\i386\acces.cp_ c:\Windows\system32\access.cpl
Example: expand /d d:\i386\driver.cab

Fixboot
Description: Writes a new partition boot sector onto the specified partition.
Usage: fixboot [drive]
drive: The drive to which a boot sector will be written. This replaces the default drive, which is the system partition you are logged on to. An example of a drive is: D:.
Example: fixboot d:

Fixmbr
Description: Repairs the master boot record of the specified disk.
Usage: fixmbr [device_name]
device_name: The device (drive) on which you want to write a new master boot record. The name can be obtained from the output of the map command. An example of a device name is: \Device\HardDisk0.
Example: fixmbr \Device\HardDisk0

Format
Description: Formats a disk.
Usage: format [drive:] [/q] [/fs:file-system]
drive: Specifies the drive you want to format. You cannot format a floppy disk from the Recovery Console.
/q: Performs a quick format of the drive. The drive is not scanned for bad areas, so you should use this parameter only on drives that you have previously formatted.
/fs:file-system: Specifies the file system to use: FAT, FAT32, or NTFS If you don't specify a file system, the existing file system format is used.

Help
Description: Displays a list of the commands you can use in the Recovery Console. Usage: help [commandname]
commandname: Provides information about the command, including the parameters you can use with the command.
Example: help expand
Example: expand /?

Listsvc
Description: Lists the services and drivers available on the computer.
Usage: listsvc
Example: listsvc

Logon
Description: Logs on to a Windows installation.
Usage: logon
Example: logon

Map
Description: Displays the drive letter mappings.
Usage: Map [arc]
arc : Instructs the map command to display Advanced RISC Computing (ARC) device names instead of device names. An example of an ARC device name is: multi(0)disk(0)rdisk(0)partition(1) The equivalent device name is: \Device\HardDisk0\Partition1
Example: map arc

Mkdir (Md)
Description: Creates a directory.
Usage: mkdir [drive:]path -or- md [drive:]path
drive: :Specifies the drive on which you want to create the new directory.
path: :Specifies the name and location of the new directory. You cannot use wildcard characters.
Example: mkdir c:/new

More
Description: Displays a text file.
Usage: more [drive:][path] filename -or- type [drive:][path] filename
[drive:][path] filename: Specifies the location and name of the file that you want to view. If you are using an NTFS drive, and the file name contains spaces, you must enclose the file name within quotation marks (").

Net Use
Description: Connects a network share to a drive letter.
Usage: net use [\\ComputerName\ShareName [/user:[DomainName\]UserName] password] | [drive letter:] [/d]
\\ComputerName\ShareName: Specifies the name of the server and the shared resource. If ComputerName contains blank characters, enclose the entire computer name from the double backslash (\\) to the end of the computer name in quotation marks. The computer name can be from 1 to 15 characters long.
/user: : Specifies the user name with which the connection is made.
DomainName: Domain-name to use when validating the credentials for the User.
UserName: Specifies the user name with which to log on.
Password: Specifies the password needed to access the shared resource. Leave blank to produce a prompt for the password. The password is not displayed when you type it at the password prompt.
/d: Indicates that this connection is to be disconnected.

Rename (Ren)
Description: Renames a single file.
Usage: rename [drive:][path] filename1 filename2 -or- ren [drive:][path] filename1 filename2
[drive:][path] filename1: Specifies the location and name of the file you want to rename. You cannot use wildcard characters.
filename2: Specifies the new name for the file. You cannot specify a new drive or path when renaming files.

Rmdir (Rd)
Description: Deletes a directory.
Usage: rmdir [drive:]path -or- rd [drive:]path
[drive:]path : Specifies the location and name of the directory you want to delete. You cannot use wildcard characters.

Set
Description: Displays and sets environment variables.
Usage: set [variable=[string]]
variable: Specifies the variable you want to set or modify. The Recovery Console supports the following environment variables: AllowWildCards, AllowAllPaths, AllowRemovableMedia, NoCopyPrompt string: Specifies the string you want to associate with the specified variable.
Example: set allowwildcards=true
Example: set nocopyprompt=true

Systemroot
Description: Sets the current directory to the systemroot directory of the system you are currently logged on to.
Usage: systemroot
Example: systemroot

Type
Description: Displays a text file.
Usage: type [drive:][path] filename -or- more [drive:][path] filename
[drive:][path] filename: Specifies the location and name of the file that you want to view. If you are using an NTFS drive, and the file name contains spaces, you must enclose the file name within quotation marks.


Comments (0)add comment

Write comment
smaller | bigger

security image
Write the displayed characters


busy
 
Malwarebytes. Destroying malware, one byte at a time

Advertisment (text)


PC-Offensive

PC Offensive Hardware, Software and Gaming News, Reviews, Videos and Tech Help. Visit: PC Offensive.

Dilatory Games

Dilatory Games - Only The Best Free Flash Games

Dilatory Games - Only The Best Free Flash Games

Word Flippa

http://www.wordflippa.com Fun with Facebook, flip your words around with Word Flippa