Você está na página 1de 116

About ansi.

sys

Defines functions that change display graphics, control cursor movement and reassign keys. The
ANSI.SYS device driver supports ANSI terminal emulation of escape sequences to control your system's
screen and keyboard. An ANSI escape sequence is a sequence of ASCII characters, the first two are the
escape character (1Bh) and the left-bracket character (5Bh). The character or characters following the
escape and left-bracket characters specify an alphanumeric code that controls a keyboard or display
function. ANSI escape sequences distinguish between uppercase and lowercase letters; for example, "A"
and "a" have completely different meanings.

Availability

The ansi.sys command is external file and is available in

MS-DOS 5.0 and above


Windows 95
Windows 98
Windows NT
Windows 2000
Windows XP

How to load

This device driver must be loaded by a device or devicehigh command in your CONFIG.SYS file.

To load this file within Windows 95/98 the config.sys must have:

device=c:\windows\command\ansi.sys

To load this file within Windows 3.x / Windows NT it would need:

device=c:\dos\ansi.sys

Syntax

Syntax:

Device=[drive:][path]ANSI.SYS [/x] [/k] [/r]

Parameters:

[drive:][path] Specifies the location of the Ansi.sys file. Additional [drive:][path] specifies the location of
the Ansi.sys file. Additional information on where to load these files can be found in the how to load
section.

Switches
/x Remaps extended keys independently on 101-key keyboards.

/k Causes ANSI.SYS to treat a 101-key keyboard like an 84-key keyboard. This is equivalent to the
command SWITCHES=/k. If you usually use the SWITCHES=/k command, you will need to use the /k
switch with ANSI.SYS.

/r Adjusts line scrolling to improve readability when ANSI.SYS is used with screen-reading programs
(which makes computers more accessible to people with disabilities).

Parameters

Pn Numeric parameter. Specifies a decimal number.

Ps Selective parameter. Specifies a decimal number that you use to select a function. You can specify
more than one function by separating the parameters with semicolons.

PL Line parameter. Specifies a decimal number that represents one of the lines on your display or on
another device.

Pc Column parameter. Specifies a decimal number that represents one of the columns on your screen
or on another device.

Escape sequences

ANSI escape sequences for cursor movement, graphics, and keyboard settings:

In the below list of ANSI escape sequences, the abbreviation ESC represents the ASCII escape character
27 (1Bh), which appears at the beginning of each escape sequence.

ESC[PL;PcH Cursor Position: Moves the cursor to the specified position (coordinates). If you do not
specify a position, the cursor moves to the home position — the upper-left corner of the
screen (line 0, column 0). This escape sequence works the same way as the below
Cursor Position escape sequence.

ESC[PL;Pcf Cursor Position: Works the same way as the preceding Cursor Position escape sequence.

ESC[PnA Cursor Up: Moves the cursor up by the specified number of lines without changing
columns. If the cursor is already on the top line, ANSI.SYS ignores this sequence.

ESC[PnB Cursor Down: Moves the cursor down by the specified number of lines without changing
columns. If the cursor is already on the bottom line, ANSI.SYS ignores this sequence.

ESC[PnC Cursor Forward: Moves the cursor forward by the specified number of columns without
changing lines. If the cursor is already in the rightmost column, ANSI.SYS ignores this
sequence.

ESC[PnD Cursor Backward: Moves the cursor back by the specified number of columns without
changing lines. If the cursor is already in the leftmost column, ANSI.SYS ignores this
sequence.

ESC[s Save Cursor Position: Saves the current cursor position. You can move the cursor to the
saved cursor position by using the Restore Cursor Position sequence.

ESC[u Restore Cursor Position: Returns the cursor to the position stored by the Save Cursor
Position sequence.

ESC[2J Erase Display: Clears the screen and moves the cursor to the home position (line 0,
column 0).

ESC[K Erase Line: Clears all characters from the cursor position to the end of the line (including
the character at the cursor position).

ESC[Ps;...;Psm Set Graphics Mode: Calls the graphics functions specified by the below values. These
specified functions remain active until the next occurrence of this escape sequence.
Graphics mode changes the colors and attributes of text (such as bold and underline)
displayed on the screen.

Text attributes

0 All attributes off

1 Bold on

4 Underscore (on monochrome display adapter only)

5 Blink on

7 Reverse video on
8 Concealed on

Foreground colors

30 Black

31 Red

32 Green

33 Yellow

34 Blue

35 Magenta

36 Cyan

37 White

Background colors

40 Black

41 Red

42 Green

43 Yellow

44 Blue

45 Magenta

46 Cyan

47 White

Parameters 30 through 47 meet the ISO 6429 standard.


ESC[=Psh

Set Mode: Changes the screen width or type to the mode specified by one of the below values:

0 40 x 148 x 25 monochrome (text)

1 40 x 148 x 25 color (text)

2 80 x 148 x 25 monochrome (text)

3 80 x 148 x 25 color (text)

4 320 x 148 x 200 4-color (graphics)

5 320 x 148 x 200 monochrome (graphics)

6 640 x 148 x 200 monochrome (graphics)

7 Enables line wrapping

13 320 x 148 x 200 color (graphics)

14 640 x 148 x 200 color (16-color graphics)

15 640 x 148 x 350 monochrome (2-color graphics)

16 640 x 148 x 350 color (16-color graphics)

17 640 x 148 x 480 monochrome (2-color graphics)

18 640 x 148 x 480 color (16-color graphics)

19 320 x 148 x 200 color (256-color graphics)

Reset Mode: Resets the mode by using the same values that Set Mode uses, except for 7, which disables
line wrapping. The last character in this escape sequence is a lowercase L.

ESC[code;string;...p
Set Keyboard Strings: Redefines a keyboard key to a specified string. The parameters for this escape
sequence are defined as follows:

 Code is one or more of the values listed in the below table. These values represent keyboard
keys and key combinations. When using these values in a command, you must type the
semicolons shown in this table in addition to the semicolons required by the escape sequence.
The codes in parentheses are not available on some keyboards. ANSI.SYS will not interpret the
codes in parentheses for those keyboards unless you specify the /x switch in the device
command for ANSI.SYS.

 String is either the ASCII code for a single character or a string contained in quotation marks. For
example, both 65 and "A" can be used to represent an uppercase A.

Important: Some of the values in the below table are not valid for all computers. Check your computer's
documentation for values that are different.

ASCII Key Codes

Key Code ^SHIFT^+code ^CTRL^+code ALT+code

F1 0;59 0;84 0;94 0;104

F2 0;60 0;85 0;95 0;105

F3 0;61 0;86 0;96 0;106

F4 0;62 0;87 0;97 0;107

F5 0;63 0;88 0;98 0;108

F6 0;64 0;89 0;99 0;109

F7 0;65 0;90 0;100 0;110

F8 0;66 0;91 0;101 0;111

F9 0;67 0;92 0;102 0;112

F10 0;68 0;93 0;103 0;113


F11 0;133 0;135 0;137 0;139

F12 0;134 0;136 0;138 0;140

HOME (num keypad) 0;71 55 0;119 -

UP ARROW (num keypad) 0;72 56 (0;141) -

PAGE UP (num keypad) 0;73 57 0;132 -

LEFT ARROW (num keypad) 0;75 52 0;115 -

RIGHT ARROW (num keypad) 0;77 54 0;116 -

END (num keypad) 0;79 49 0;117 -

DOWN ARROW (num keypad) 0;80 50 (0;145) -

PAGE DOWN (num keypad) 0;81 51 0;118 -

INSERT (num keypad) 0;82 48 (0;146) -

DELETE (num keypad) 0;83 46 (0;147) -

HOME (224;71) (224;71) (224;119) (224;151)

UP ARROW (224;72) (224;72) (224;141) (224;152)

PAGE UP (224;73) (224;73) (224;132) (224;153)

LEFT ARROW (224;75) (224;75) (224;115) (224;155)

RIGHT ARROW (224;77) (224;77) (224;116) (224;157)

END (224;79) (224;79) (224;117) (224;159)

DOWN ARROW (224;80) (224;80) (224;145) (224;154)


PAGE DOWN (224;81) (224;81) (224;118) (224;161)

INSERT (224;82) (224;82) (224;146) (224;162)

DELETE (224;83) (224;83) (224;147) (224;163)

PRINT SCREEN - - 0;114 -

PAUSE/BREAK - - 0;0 -

BACKSPACE 8 8 127 (0)

ENTER 13 0 10 (0

TAB 9 0;15 (0;148) (0;165)

NULL 0;3 - - -

A 97 65 1 0;30

B 98 66 2 0;48

C 99 66 3 0;46

D 100 68 5 0;18

E 101 69 5 0;18

F 102 70 6 0;33

G 103 71 7 0;34

H 104 72 8 0;35

I 105 73 9 0;23

J 106 74 10 0;36
K 107 75 11 0;37

L 108 76 12 0;38

M 109 77 13 0;50

N 110 78 14 0;49

O 111 79 15 0;24

P 112 80 16 0;25

Q 113 81 17 0;16

R 114 82 18 0;19

S 115 83 19 0;31

T 116 84 20 0;20

U 117 85 21 0;22

V 118 86 22 0;47

W 119 87 23 0;17

X 120 88 24 0;45

Y 121 89 25 0;21

Z 122 90 26 0;44

1 49 33 - 0;120

2 50 64 0 0;121

3 51 35 - 0;122
4 52 36 - 0;123

5 53 37 - 0;124

6 54 94 30 0;125

7 55 38 - 0;126

8 56 42 - 0;126

9 57 40 - 0;127

0 48 41 - 0;129

- 45 95 31 0;130

= 61 43 - 0;131

] 91 123 27 0;26

[ 93 125 29 0;27

92 124 28 0;43

; 59 58 - 0;39

' 39 34 - 0;40

. 46 60 - 0;51

/ 47 63 - 0;53

` 39 34 - 0;40

ENTER (keypad) 13 - 10 (0;116)

/ (keypad) 47 47 (0;142) (0;74)


* (keypad) 42 (0;144) (0;78) -

- (keypad) 45 45 (0;149) (0;164)

+ (keypad) 43 43 (0;150) (0;55)

5 (keypad) (0;76) 53 (0;143) -

ANSI

Short for American National Standards Institute, ANSI was founded in 1981, and today is a voluntary
organization composed of over 1,300 members that establish standards for the computer industry.
Below is a listing of related ANSI documents and their associated standards.

 X3.221-1994

 X3.279-1996

 X3.298-1997

 NCITS 317-1998

 NCITS 340-2000

 NCITS 347-2001

Escape sequence

Invented by Bob Bemer, an escape sequence is two or more characters that often begin with an escape
character that tells the computer or software program to perform a function or command. Below is a
listing of some of the commonly used and available escape sequences used in programming languages
and some text editors.

\' Single quote

\" Double quote

\a Audible bell

\b Backspace
\f Form feed

\n Newline

\r Carriage return

\t Horizontal tab

Below is an example of how an escape sequence appears to a computer and then how it is displayed to
the user.

Hello\nThis is an example of\nescape sequences.

The above example with escape sequences would display the below text.

Hello

This is an example of

escape sequences.

Finally, adding an escape sequence into a regular expression (regex) can allow you to find and replace
characters or perform a special feature. For example, in the below example of a Perl regular expression
we're finding any line that begins with a character return and deleting it.

while (<ofile>) {

$line = $_;

$line =~ s/^\n//g;

About the autoexec and config

The autoexec.bat and the config.sys were files created for MS-DOS and Windows 3.x as an easy solution
of loading the files required for various devices as well as the operating system to properly run. These
files are required for later revisions of MS-DOS and Windows 3.x to load. Because Microsoft is trying to
steer away from MS-DOS, these files are not required for Windows 95, Windows 98, Windows
NT, Windows ME, Windows 2000, Windows XP, or later operating systems. However, in some cases it
may still be necessary for users to edit or configure these files.

How to edit the files

The auotexec.bat and the config.sys are most commonly edited by the MS-DOS command file Edit. To
edit these files, type edit c:\autoexec.bat to edit the autoexec.bat file, or edit c:\config.sys to edit the
config.sys file. If the mouse drivers are not loaded properly you will not have the capability of navigating
the mouse.

If you have Windows 95, Windows 98, or later versions of Windows it is recommended that you use
the syseditcommand; to run this program, click Start / Run and type sysedit.

Remarking information

Remarking lines within the autoexec.bat or the config.sys allows you to temporarily or permanently
prevent a line from loading each time you boot the computer. This is done by placing "REM " in front of
the line you wish to skip.

If you are encountering issues with a line in the autoexec.bat it is highly recommended that you remark
the line instead of removing it. This will prevent issues from arising if the line needs to be placed back
into the autoexec.bat.

Getting additional memory

The below commands will help allow your computer to load programs into memory more efficiently
allowing you to have more memory for MS-DOS programs / games.

Make sure you have the below three lines at the beginning of your config.sys file.

DEVICE=C:\Windows\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\Windows\EMM386.EXE NOEMS

By placing the DOS=HIGH,UMB on the second line, this can, in some cases, save memory because it is
loading DOS into upper memory before loading the memory manager. Additionally, the first and third
lines cannot be loaded into high memory because these lines are the memory managers.

Load all your devices in your config.sys and autoexec.bat into high memory.

Autoexec.bat layout

Below is an example of what an autoexec may look like.

@echo off
SET SOUND=C:\PROGRA~1\CREATIVE\CTSND
SET BLASTER=A220 I5 D1 H5 P330 E620 T6
SET PATH=C:\Windows;C:\
LH C:\Windows\COMMAND\MSCDEX.EXE /D:123

Command Explanation

@echo off Tells DOS to just read the lines but don't echo them back
to the screen.

SET This example is for the particular sound card that we have
SOUND=C:\PROGRA~1\CREATIVE\CTSND in one of the machines that we have. The set sound is
telling the computer to send all sound events that the
computer may run to that directory.

SET BLASTER=A220 I5 D1 H5 P330 E620 T6 Tells the computer to set the sound blaster settings. This is
a good line for game players; if you have this line in your
autoexec.bat you will know all settings players; if you have
this line in your autoexec.bat you will know all settings for
your sound card. A220 = port address "220", I5 = IRQ 5, D1
= DMA 1 usually being the settings you will need for any
game out on the market.

SET PATH=C:\Windows;C:\ Sets the computer to look in the C:\windows directory or


the root if a command used at the prompt is not found.

LH Line used for the CD-ROM. If you have Windows 95+, the
C:\Windows\COMMAND\MSCDEX.EXE MSCDEX will always be in the C:\Windows\COMMAND. In
/D:123 Windows 3.x or DOS, this will usually be either in C:\DOS
or C:\Windows directory. The /D:123 is the name of the
driver name that loads in upper memory; this can be
anything, usually /D:MSCD0001. However, this is not an
actual driver, this is just the name for the driver. Ensure if
you change this line that you change it in the config.sys on
your CD-ROM line. If the two are not the same, your CD-
ROM drive will not load.

LH C:\MOUSE\MOUSE.EXE Loads the mouse driver into memory. However, not all
mice use the same drivers. Although the mouse may use
mouse.exe it could also be "mouse.com" or "mouse.sys",
which is loaded in the config.sys.
C:\DOS\SMARTDRV.EXE /X Loads the smartdrive disk cache utility into memory. See
the smartdrv command page for additional information
about this utility.

DOSKEY Simple dos command to load DOSKEY into memory so


when in DOS you can use it without having to load it.

CLS MS-DOS command to clear screen.

WIN Used for users using Windows 3.x, this line will load
Windows automatically when booting the computer.

Config.sys layout

Below is an example of what the config.sys may look like:

DEVICE=C:\Windows\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\Windows\EMM386.EXE NOEMS
FILES=30
STACKS=0,0
BUFFERS=20
DEVICEHIGH=C:\Windows\COMMAND\ANSI.SYS
DEVICEHIGH=C:\MTMCDAI.SYS /D:123

Command Explanation

DEVICE=C:\Windows\HIMEM.SYS The Himem.sys line is a very important line; this


line will allow you to load drivers into high
memory. If this line is not present, Windows 3.x
will not load.

DOS=HIGH,UMB This line will load DOS into high memory in an


upper memory block. Note the location usually
best placed after the HIMEM.SYS.

DEVICE=C:\Windows\EMM386.EXE NOEMS The EMM386 line loads the extended memory


manager. However, some older MS-DOS games
have problems with extended memory and will not
run without the NOEMS statement.
FILES=30 The files line allow Windows to load 30 files at the
same time. Usually, however, going higher may
decrease the computer's performance; 30 is found
to work the best. Also ensure that this line is all as
one line and that there is not a space between and
after the =.

STACKS=0,0 The stacks line was first used in MS-DOS 3.2 and
was used to swap the stack whenever an
asynchronous hardware interrupt occurred. Later
in MS-DOS 3.3 the line STACKS=0,0 was added into
the config.sys. In special circumstances, this line
was changed to STACKS=9,128.

The STACKS statement has a range of 8-64, 32-512.


If a higher value is entered you will receive a FATAL
: Internal Stack Failure, System Halted error
message.

BUFFERS=20 Buffers line is to load buffers into memory allowing


Windows to load memory.

DEVICEHIGH=C:\Windows\COMMAND\ANSI.SYS The ansi.sys line is a driver for DOS to allow you to


have different colors / sizes and special characters
at the DOS prompt.

DEVICEHIGH=C:\MTMCDAI.SYS /D:123 This line is the name of the CD-ROM driver on the
particular system we are working on. The /D:123
represents the name of the driver, which in this
case is named 123, however, can be named
anything, usually MSCD0001. Note, however, that
/D:123 must be exactly the same in config.sys and
autoexec.bat; if they are different, the CD-ROM
will not work in DOS.

LASTDRIVE= Allows you to specify the last drive installed on the


computer. It is not recommended this line be used
unless you are using Windows 3.11 or below. This
line can cause issues with Windows 95 & 98 and
will generally be remarked by Windows
automatically.

FCBS= Line used to specify the number of file-control


blocks for file sharing. This line should only be used
when programs require it, and today, is generally
not used or required. FCBS can utilize between 1
and 255.

About append

Similar to the PATH MS-DOS command, the append command enables a user to open files in the
specified directory as if they were in the current directory.

See our append definition if you're looking for information about how to append text or a file into a
file.

Availability

Append.exe is an external command available in the below versions of Microsoft operating systems.

MS-DOS 3.2x - 6.2x


Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP

Syntax

APPEND Drive: \Path /X /E Path:on or off

Drive: The drive letter to be searched.

\Path The path to be searched.

/X :on or :off Extends the DOS search path for specified files when executing programs.
Processes SEARCH FIRST, FIND FIRST and EXEC functions. The :ON and :OFF
are new to version MS-DOS 5.0,
/Path :on or :off If path is already included for a program file, :on tells program to also search
in appended directories. Default= :on. Note: The default value of = :on was
added in MS-DOS 5.0 and above

/E Causes the appended path to be stored in the DOS environment and


searched for there.

; Use ";" to separate multiple Drive:\path statements on one line.

Examples

Note: You can not use any paths on the same command line as /X & /E. The :ON and :OFF options are
only available in MS-DOS 5.0 and later. Do not append within a Windows environment. The append
command can be used on a network. Invalid drive specifications will not be detected until DOS attempts
to use the search path to find specified files.

append

Using append alone will display the current search path.

append c:\docs;c:\letters;c:\files

Sets the computer to look for files in the docs, letters and files directory, therefore when typing a
command such as "edit myfile.txt" if the file is not present in the current directory the computer would
also look for the file in docs, letters and files directory.

About path

Path is used to specify the location where MS-DOS looks when using a command. For example, when
using the command "format", if the path is not specified to where the command is you will receive bad
command or file name.

Availability

The path command is an internal command that is available in the below Microsoft operating systems.

All Versions of MS-DOS


Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax

Displays or sets a search path for executable files.

PATH [[drive:]path[;...]]
PATH ;

Type PATH ; to clear all search-path settings and direct Windows to search
only in the current directory.
Type PATH without parameters to display the current path.

Examples

path=c:\windows\command

This is where a lot of DOS commands are stored in Window 95; if you are not able to do a dos command,
type this command in, allowing all commands you type in, such as "deltree", to be loaded from this
directory. However, if you have another file in another directory such as C:\DOS it will no longer look
there.

Additional information

DOS limits the path to 122 bytes. Every command is limited to 127 bytes; however, 127 - 5 (minus 5
because of PATH=) = 122.

Microsoft Windows 2000 and Windows XP users must set or modify their path statement through the
environment variables, additional information on how to do this can be found on document CH000549.

About arp

Displays, adds and removes arp information from network devices.

Availability

The arp.exe command is an external command accessed through the C:\Windows or C:\Winnt\System32
directory and is available in the below Microsoft operating systems.

Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax

ARP -s inet_addr eth_adr [if_addr]


ARP -d inet_addr [if_addr]
ARP -a [inet_addr] [-N if_addr]

-a Displays current ARP entries by interrogating the current protocol data. If inet_addr is
specified, the IP and Physical addresses for only the specified computer are displayed. If
more than one network interface uses ARP, entries for each ARP table are displayed.

-g Same as -a

inet_addr Specifies an Internet address.

-N if addr Displays the ARP entries for the network interface specified by if_addr.

-d Deletes the host specified by inet_addr.

-s Adds the host and associates the Internet address inet_addr with the Physical address
eth_addr. The Physical address is given as 6 hexadecimal bytes seperated by hyphens. The
entry is permanent.

eth_addr Specifies a physical address

if_addr If present, this specifies the Internet address of the interface whose address translation table
should be modified. If not present, the first applicable interface will be used.

Examples

arp -a

Interface 220.0.0.80

Internet Address Physical Address Type

220.0.0.160 00-50-04-62-F7-23 static

The Physical Address or MAC address as shown above in the format aa-bb-cc-dd-ee-ff is the unique
manufacturer identification number. This number should always be an unique address.

An example of how to change the above IP address 220.0.0.160 to 220.0.0.161 in this case would be:

arp -s 220.0.0.161 00-50-04-62-F7-23


If an IP address has already been assigned to the specific network adapter it is not possible to change
that assigned IP address to a new address. In addition, networks italicizing DHCP, BOOTP or RARP will
automatically assign the card an IP address, therefore, this command would not be utilized.

MAC

1. Short for Medium Access Control, a MAC address also known as a physical address is a unique
address number formatted in hexadecimal format and given to each computer or network
device on a computer network. Below is an example of a MAC address:

A1:B2:C3:D4:E5:F6

Because a MAC address is a unique address, a computer network will not have the same MAC
address assigned to more than one computer or network device.

Users who are running Microsoft Windows who are interested in learning their MAC address or
another computer's MAC address can use the nbstat or ipconfig command. Additional
information about these command can be found on our nbtstat command page and ipconfig
command page.

If you're running Linux / Unix or a variant, you can determine the MAC Address or hardware
address using the ifconfig command. Additional information about this command can be found
on our ifconfig command page.

About nbtstat

MS-DOS utility that displays protocol statistics and current TCP/IP connections using NBT.

Availability

The nbtstat command is an external command that is available in the below Microsoft operating
systems.

Windows 98

Windows ME

Windows NT
Windows 2000

Windows XP

Windows Vista

Windows 7

Syntax

NBTSTAT [ [-a RemoteName] [-A IP address] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [interval] ]

-a (adapter status) Lists the remote machine's name table given its name

-A (Adapter status) Lists the remote machine's name table given its IP address.

-c (cache) Lists NBT's cache of remote [machine] names and their IP addresses

-n (names) Lists local NetBIOS names.

-r (resolved) Lists names resolved by broadcast and via WINS

-R (Reload) Purges and reloads the remote cache name table

-S (Sessions) Lists sessions table with the destination IP addresses

-s (sessions) Lists sessions table converting destination IP addresses to computer NETBIOS names.

-RR (ReleaseRefresh) Sends Name Release packets to WINs and then, starts Refresh

RemoteName Remote host machine name.

IP address Dotted decimal representation of the IP address.

interval Redisplays selected statistics, pausing interval seconds between each display. Press Ctrl+C to
stop redisplaying statistics.

Examples

nbtstat -a 204.224.150.3
Local Area Connection: Node IpAddress: [204.224.150.3] Scope Id: [] NetBIOS Remote Machine Name
Table Name Type Status –

About ipconfig

Ipconfig is a DOS utility that can be used from MS-DOS and a MS-DOS shell to display the network
settings currently assigned and given by a network. This command can be utilized to verify a network
connection as well as to verify your network settings.

Availability

The ipconfig.exe command is an external command and is available in the below Microsoft operating
systems.

Windows 95
Windows 98
Windows ME
Windows 2000
Windows XP
Windows Vista
Windows 7

Windows 95, 98, and ME syntax

/All Display detailed information.

/Batch [file] Write to file or ./WINIPCFG.OUT

/renew_all Renew all adapters.

/release_all Release all adapters.

/renew N Renew adapter N.

/release N Release adapter N.

Windows 2000 and XP syntax

ipconfig [/? | /all | /release [adapter] | /renew [adapter] | /flushdns | /registerdns | /showclassid
adapter | /setclassid adapter [classidtoset] ]
/all Display full configuration information.

/release Release the IP address for the specified adapter.

/renew Renew the IP address for the specified adapter.

/flushdns Purges the DNS Resolver cache.

/registerdns Refreshes all DHCP leases and re-registers DNS names

/displaydns Display the contents of the DNS Resolver Cache.

/showclassid Displays all the dhcp class IDs allowed for adapter.

/setclassid Modifies the dhcp class id.

The default is to display only the IP address, subnet mask and default gateway for each adapter bound
to TCP/IP.

For Release and Renew, if no adapter name is specified, then the IP address leases for all adapters
bound to TCP/IP will be released or renewed.

For SetClassID, if no class id is specified, then the classid is removed.

Examples

To get your computers local network IP address, subnet mask, and default gateway typing ipconfig alone
will display this information as shown below. Keep in mind this is only your local network information. If
you're trying to determine your IP address used on the Internet we suggest viewing our system
information page.

ipconfig

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . : hsd1.ut.comcast.net.


IP Address. . . . . . . . . . . . : 192.168.201.245
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.201.1

To get all local network information for your computer use the /all switch as shown below, followed by
the results that would be seen when using this command.
ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . : COMPUTERH1


DNS Servers . . . . . . . . : 123.45.67.8
111.111.111.1
111.111.111.1
Node Type . . . . . . . . . : Broadcast
NetBIOS Scope ID. . . . . . :
IP Routing Enabled. . . . . : No
WINS Proxy Enabled. . . . . : No
NetBIOS Resolution Uses DNS : No

0 Ethernet adapter :

Description . . . . . . . . : PPP Adapter.


Physical Address. . . . . . : 44-44-44-54-00-00
DHCP Enabled. . . . . . . . : Yes
IP Address. . . . . . . . . : 123.45.67.802
Subnet Mask . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . : 123.45.67.801
DHCP Server . . . . . . . . : 255.255.255.255
Primary WINS Server . . . . :
Secondary WINS Server . . . :
Lease Obtained. . . . . . . : 01 01 80 12:00:00 AM
Lease Expires . . . . . . . : 01 01 80 12:00:00 AM

1 Ethernet adapter :

Description . . . . . . . . : 3Com 3C90x Ethernet Adapter


Physical Address. . . . . . : 00-50-04-62-F7-23
DHCP Enabled. . . . . . . . : Yes
IP Address. . . . . . . . . : 111.111.111.108
Subnet Mask . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . : 111.111.111.1
DHCP Server . . . . . . . . : 111.111.111.1
Primary WINS Server . . . . :
Secondary WINS Server . . . :
Lease Obtained. . . . . . . : 11 16 00 12:12:44 AM
Lease Expires . . . . . . . :
ipconfig /displaydns

Running the above command would display all the DNS information.

ipconfig /flushdns

Delete all DNS entries.

IP

1. Short for Internet Protocol, IP is an address of a computer or other network device on a network
using IP or TCP/IP. For example, the number "166.70.10.23" is an example of such an address. These
addresses are similar to an addresses used on a house and is what allows data to reach the appropriate
destination on a network.

There are five classes of available IP ranges: Class A, Class B, Class C, Class D and Class E, while only A, B
and C are commonly used. Each class allows for a range of valid IP addresses. Below is a listing of these
addresses.

Class Address Range Supports

Class A 1.0.0.1 to 126.255.255.254 Supports 16 million hosts on each of 127 networks.

Class B 128.1.0.1 to 191.255.255.254 Supports 65,000 hosts on each of 16,000 networks.

Class C 192.0.1.1 to 223.255.254.254 Supports 254 hosts on each of 2 million networks.

Class D 224.0.0.0 to 239.255.255.255 Reserved for multicast groups.

Class E 240.0.0.0 to 254.255.255.254 Reserved for future use, or Research and Development Pur

Ranges 127.x.x.x are reserved for loopback or localhost, for example, 127.0.0.1 is the common loopback
address. Range255.255.255.255 broadcasts to all hosts on the local network.

IP address breakdown

Every IP address is broke down into four sets of octets that break down into binary to represent the
actual IP address. The below chart is an example of the IP 255.255.255.255. If you are new to binary, we
highly recommend reading ourbinary and hexadecimal conversions section to get a better
understanding of what we're doing in the below charts.

IP: 255 255 255

Binary value: 11111111 11111111 11111111


Octet value: 8 8 8

If we were to break down the IP "166.70.10.23", you would get the below value. The below fist row is
the IP address, the second row the binary values, and the third row the binary value calculated to equal
the total of that section of the IP address.

166 70 10

10100110 01000110 00001010

128+32+4+2=166 64+4+2=70 8+2=10

Automatically assigned addresses

There are several IP addresses that are automatically assigned when you setup a home network. These
default addresses are what allow your computer and other network devices to communicate and
broadcast information over your network. Below is the most commonly assigned network addresses in a
home network.

192.168.1.0 0 is the automatically assigned network address.

192.168.1.1 1 is the commonly used address used as the gateway.

192.168.1.2 2 is also a commonly used address used for a gateway.

192.168.1.3 - 254 Addresses beyond 3 are assigned to computers and devices on the network.

192.168.1.255 255 is automatically assigned on most networks as the broadcast address.

Getting an IP address

By default the router you use will assign each of your computers their own IP address, often
using NAT to forward the data coming from those computers to outside networks such as the Internet. If
you need to register an IP address that can be seen on the Internet, you must register
through InterNIC or use a web host that can assign you addresses.

Other IP address questions and answers

 See your IP address and other system settings.

 How to determine an IP address.

 How do I determine the IP address of another computer or website?

 Help with ping, winipcfg, and other network commands.


 How do I determine the physical location of an IP address?

 How can I hide my IP address?

 Computer networks and network card help and support.

2. A Linux and Unix command that allows the user to configure their network settings. See the ip
command page for further information.

Multicast

Packet or message sent across a network by a single host to multiple clients or devices

Localhost

Default name describing the local computer address also known as


the loopback address. For example, typing: ping localhost would ping the local IP
address of 127.0.0.1 (the loopback address). When setting up a web server or software on a web server,
127.0.0.1 is used to point the software to the local machine.

This IP address is the local IP address and is not the IP address used by your computer to
communicate with other computers on your network or the Internet.

Broadcast

1. In general, a broadcast describes a message or data sent to multiple individuals in an area. For
example, TV shows are broadcast to all subscribers in an area.

2. In computer networking, the broadcast address is used to distribute a signal across a network,
commonly used to declare to other devices on a network that a new device has connected to
the network and to give those other devices information about the newly connected device. The
broadcast address on a network is commonly an address that ends with 255. For example, a
broadcast netmask is 255.255.255.255.
3. With wireless networks, routers will broadcast the SSID, allowing all wireless devices to easily
find the wireless network.

ask

A netmask is a 32-bit mask used to divide an IP address into subnets and specify the networks available
hosts. In a netmask, two bits are always automatically assigned. For example, in 255.255.225.0, "0" is
the assigned network address; and in 255.255.255.255, "255" is the assigned broadcast address. The 0
and 255 are always assigned and cannot be used.

Below is an example of a netmask and an example of its binary conversion.

Netmask: 255. 255. 255. 255

Binary: 11111111 11111111 11111111 11111111

Netmask length 8 16 24 32

Counting out the bits in the binary conversion allows you to determine the netmask length. In the above
example you have an example of a 32-bit address. However, this address is a broadcast address and
does not allow any hosts (computers or other network devices) to be connected to it.

A commonly used netmask is a 24-bit netmask as seen below.

Netmask: 255. 255. 255. 0

Binary: 11111111 11111111 11111111 00000000

Netmask length 8 16 24 --

Using a 24-bit netmask the network would be capable of 2,097,150 networks or 254 different hosts with
an IP range of 192.0.1.x - 223.255.254.x. This is commonly plenty of addresses for one network.

To determine the capable amount of networks a netmask is able to support is a simple formula. With
the understanding that the netmask length is 24, subtract three from that number, therefore 24-3 = 21.
Once this number is determined, take 2 to the x power - 2 (where x is the number you just determined).
Which would be 2^21 - 2 = 2,097,150. You are subtracting two from this number because of the
broadcast and network addresses that are already being used.

To determine the amount of hosts a netmask is capable of supporting is similar to the above. As you see
by the above chart, we have eight zeros. This number is similar to the 21 we determined earlier.
Therefore, 2 to the x power - 2. (where x is the number of zeros in the netmask). This would be 2^8 - 2 =
254. Again, two is subtracted from this number to account for the broadcast and network addresses.

Below is a breakdown of each of the commonly used network classes.

Class Netmask length # of networks # of hosts Netmask

Class A 8 126 16,777,214 255.0.0.0

Class B 16 16,382 65,534 255.255.0.0

Class C 24 2,097,150 254 255.255.255.0

Binary

Computers work on the principle of number manipulation. Inside the computer, the numbers are
represented in bits andbytes. For example, the number three is represented by a byte with bits 0 & 1
set; 00000011. This is numbering system using base 2. People commonly use a decimal or Base 10
numbering system. What this means is that in Base 10, count from 0 to 9 before adding another digit.
The number 22 in Base 10 means we have 2 sets of 10's and 2 sets of 1's.

Base 2 is also known as binary since there can only be two values for a specific digit; either a 0 = OFF or
a 1 = ON. You cannot have a number represented as 22 in binary notation. The decimal number 22 is
represented in binary as 00010110 which by following the below chart breaks down to:

Bit Position 7 6 5 4 3 2 1 0

1 1 1 1 1 1 1 1

Decimal 128 64 32 16 8 4 2 1

22 or 00010110:

All numbers representing 0 are not counted, 128, 64, 32, 8, 1 because 0 represents OFF
However, numbers representing 1 are counted, 16 + 4 + 2 = 22 because 1 represents ON

Decimal Values and Binary Equivalents chart

Decimal Binary

1 1

2 10

3 11

4 100

5 101

6 110

7 111

8 1000

9 1001

10 1010

16 10000

32 100000

64 1000000

100 1100100

256 100000000

512 1000000000
1000 1111110100

1024 10000000000

Hexadecimal

The other major numbering system used by computers is hexadecimal, or Base 16. In this system, the
numbers are counted from 0 to 9, then letters A to F before adding another digit. The letter A through F
represent decimal numbers 10 through 15, respectively. The below chart indicates the values of the
hexadecimal position compared to 16 raised to a power and decimal values. It is much easier to work
with large numbers using hexadecimal values than decimal.

To convert a value from hexadecimal to binary, you merely translate each hexadecimal digit into its 4-bit
binary equivalent. Hexadecimal numbers have either and 0x prefix or an h suffix. For example, the
hexadecimal number:

0x3F7A

Translates into, Using the Binary chart and the below chart for Hex:

0011 1111 0111 1010

Decimal Hexadecimal Binary

0 0 0000

1 1 0001

2 2 0010

3 3 0011

4 4 0100

5 5 0101

6 6 0110

7 7 0111
8 8 1000

9 9 1001

10 A 1010

11 B 1011

12 C 1100

13 D 1101

14 E 1110

15 F 1111

DHCP

Short for Dynamic Host Configuration Protocol, DHCP is a protocol used to assign an IP address to a
computer or device connected to a network automatically. Routers, switches, or servers that assign
addresses to other computersusing DHCP on a network make the setup and management of the
network easier by not requiring the user or networkadmin to have to manually define each address for
each computer and network device on the network.

For home network users you can setup a DHCP network by purchasing a home router, wireless router,
or switch withNAT/DHCP and connect each computer to it. In order for each computer or network
device to properly work on a DHCP network with any firewall setup ports 67 and 68 need to be open.

BOOTP

Short for BOOTstrap Protocol, BOOTP is a protocol that allows a client to discover certain network
information; for example, its own IP address.

RARP

Short for Reverse Address Resolution Protocol, RARP is originally defined in RFC 903 and performs the
reverse steps of ARP. RARP uses the hardware address to determine the device's IP address.

How to determine an IP address.

Issue

How to determine an IP address.


Solution

Note: This document contains information about determining your own local IP address and not
obtaining obtaining an IP address of another computer or a website. If you want to know how the
Internet sees your IP address use thesystem information tool.

Microsoft Windows Users

1. Click Start / Run and type: cmd or command to open a Windows command line.

2. From the prompt, type ipconfig and press enter. This should give you information similar to
what is shown below.

Windows 2000 IP Configuration

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :


IP Address. . . . . . . . . . . . : 192.168.1.101
Subnet Mask . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . : 192.168.1.1

As seen in the above example, the IP address as well as other important network information is listed
when using the "ipconfig" command. If you have more than one network adapter, e.g. a wireless
adapter and network adapter you'll see each adapter listed when using this command.

Home network and corporate network users

This information is the IP address of your computer in your network. If your computer is connected to
the Internet the IP address shown in this screen will more than likely not be the IP address other people
and web pages see. To determine this IP address easily see the below online service section.

Graphical representation of network settings

Microsoft Windows XP users may get a GUI representation of their network by right-clicking the network
icon in theirsystray and selecting "Status." Within the "Local Area Connection Status" window click the
"Support" tab.

Microsoft Windows 98 users may also get a GUI representation of their network settings by clicking Start
/ Run and typing "ipconfig" in the run line. Unfortunately, not all versions of Windows have this feature.

Linux / Unix, BSD 4.2+, and Apple OS X, Operating System Users

For Linux or Unix users, to view their IP address or network information, users must have administrator
or root privileges.

1. Open the Linux or Unix shell if you are utilizing a GUI interface for your Linux or Unix machine.
2. From the prompt, type "ifconfig eth0" (without the quotes) and press enter. This should give
you a listing of network information similar to what is seen below.

eth0 Link encap:Ethernet HWaddr 00:A0:24:72:EB:0A inet addr:10.10.10.2 Bcast:10.0.0.255


Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5569799
errors:32 dropped:32 overruns:0 frame:6 TX packets:3548292 errors:0 dropped:0 overruns:0 carrier:3
Collisions:14 Interrupt:18 Base address:0xda00

As seen from the above example, users will commonly see the network settings for all their network
devices when running the "ifconfig" command. First in the above example we have the network settings
for the "lo" or "local loopback", next is the actual network settings of your network adapter.

Home network and corporate network users

This information is the IP address of your computer in your network. If your computer is connected to
the Internet the IP address shown in this screen will more than likely not be the IP address other people
and web pages see. To determine this IP address easily see the below online service section.

Apple Macintosh Users

1. From the Apple menu, select the "Apple System Profiler"

2. Open the "Network overview"

3. Open "TCP/IP"

Within this window the user will be able to see the computer's network information including the IP
address.

Home network and corporate network users

This information is the IP address of your computer in your network. If your computer is connected to
the Internet the IP address shown in this screen will more than likely not be the IP address other people
and web pages see. To determine this IP address easily see the below online service section.

How do I determine the IP address of another computer or website?

Question

How do I determine the IP address of another computer or website?

Answer

This document is for those wanting the IP address of another computer or website and not how to
find the IP address of your own computer.
To determine the IP address of another computer or website you must either know the computer
name or domain nameand use the ping command to ping the computer and obtain its IP address. For
example, in Microsoft Windows a user would open a MS-DOS command window and type "ping
<computer>" where <computer> is the name of the computer or domain name.

In the below example we're pinging computerhope.com.

C:\>ping computerhope.com Pinging computerhope.com [204.228.150.3] with 32 bytes of data:


Reply from 204.228.150.3: bytes=32 time=29ms TTL=54
....
Ping statistics for 204.228.150.3:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds: Minimum = 28ms, Maximum = 29ms, Average = 28ms

As can be seen in the above example the IP address 204.228.150.3 is the IP address of the
computerhope.com domain at the time this address was pinged.

Help with ping, winipcfg, and other network commands.

Issue

Help with ping, winipcfg, and other network commands.

Cause

It may be necessary to utilize utilities such as ping, winipcfg, tracert, etc to help identify and fix network
related issues.

Solution

Below is a listing of the various network related commands used in MS-DOS, Windows, Linux, Unix, and
other operating systems. Each command includes additional information to what the command does,
the command's syntax, and miscellaneous information.

Note: If you are not the root or admin of a computer, it is possible for these commands to be disabled or
revoked.

Arp
Finger
Hostname
Ipconfig
Pathping
Ping
Nbtstat
Net
Netstat
Nslookup
Route
Tracert / Traceroute
Whois
Winipcfg

ARP

Display or manipulate the ARP information on a network device or computer.

 See the arp command page for further help and information.

FINGER

The finger command available in Unix / Linux variants allows a user to find sometimes personal
information about a user. This information can include the last time the user logged in, when they read
their e-mail, etc... If the user creates a .PLAN or other related file the user can also display additional
information.

 See the Unix / Linux finger command page for further information and help.

HOSTNAME

The hostname command displays the host name of the Windows XP computer currently logged into.

 See the hostname command page for further help and information.

IPCONFIG

Ipconfig is a MS-DOS utility that can be used from MS-DOS and a MS-DOS shell to display the network
settings currently assigned and given by a network. This command can be utilized to verify a network
connection as well as to verify your network settings.

Windows 2000 users should use this command to determine network information.

 See the ipconfig command page for further information and help.

PATHPING

Pathping is a MS-DOS utility available for Microsoft Windows 2000 and Windows XP users. This utility
enables a user to find network latency and network loss.

 See the pathping command page for further help and information.

PING

Ping is one of the most commonly used and known commands. Ping allows a user to ping another
network IP address. This can help determine if the network is able to communicate with the network.
 See the ping command page for further help on the MS-DOS and Windows command line
command.

 See the Unix / Linux ping command page for further information on this command.

NBTSTAT

The nbtstat MS-DOS utility that displays protocol statistics and current TCP/IP connections using NBT.

 See the nbtstat command page for further help on this MS-DOS and Windows command.

NET

The net command is available in MS-DOS / Windows and is used to set, view and determine network
settings.

 See the net command page for further information on this command.

NETSTAT

The netstat command is used to display the TCP/IP network protocol statistics and information.

 See the netstat command page for further help with this MS-DOS and Windows command.

 Se the Unix / Linux netstat command for further help with this command.

NSLOOKUP

The nslookup MS-DOS utility that enables a user to do a reverse lookup on an IP address of a domain or
host on a network.

 See the nslookup command page for further help on this MS-DOS and Windows command.

 See the Unix / Linux nslookup command page for further help with this command.

 Linux users may also be interested in the host command that performs a similar task.

ROUTE

The route MS-DOS utility enables computers to view and modify the computer's route table.

 See the route command page for further information and help with this command.

TRACERT / TRACEROUTE

The tracert command in MS-DOS / Windows or the traceroute command in Unix / Linux and variants is
another commonly used network command to help determine network related issues or slowdowns.
Using this command you can view a listing of how a network packet travels through the network and
where it may fail or slow down. Using this information you can determine the computer, router, switch
or other network device possibly causing your network issues.

 See the tracert command for further help with the MS-DOS and Windows command.

 See the Unix / Linux traceroute command for further help with this command.

WHOIS

The whois command available in Unix / Linux variants helps allow a user to identify a domain name. This
command provides information about a domain name much like the WHOIS on network solutions. In
some cases the domain information will be provided from Network Solutions.

 See the Unix / Linux whois command for further information on this command.

WINIPCFG

The winipcfg command available in Windows allows a user to display network and network adapter
information. Here, a user can find such information as an IP address, Subnet Mask, Gateway, etc...

 See the winipcfg command for further information on this command.

Windows 2000, Windows XP and above users do not have winipcfg. Instead, use ipconfig.

Root

1. Alternatively referred to as an admin, administrator, and gatekeeper this account is a super user on a
computer or network and has complete control over it. When referring to a Unix / Linux computer this
user is often known as root and on a Windows computer and network this user is often referred to as
an administrator. However, each of these terms is interchangeable.

 How do I know if I have Windows administrator rights?

 Missing administrator log in on Windows XP.

 Giving a Windows XP account administrator rights.

 See the su or super user command page for further information on this Linux command.

An admin or System Administrator is also a job position and person who is responsible for maintaining
each of the computers and network in a corporate environment.

 What jobs are available in the computer industry?

2. The root is also the highest level in a directory hierarchy. For example, in MS-DOS, the root or root
directory of the primary hard disk drive would C:\. When working on a web page the root directory will
be your home directory or yourpublic_html directory.
 MS-DOS help and support.

 Users in the Microsoft recovery console can set the current directory to the system root
directory by using thesystemroot command.

How do I determine the physical location of an IP address?

Question

How do I determine the physical location of an IP address?

Answer

There are several online services that will display your IP address and the associated city, state, or
country with that IP address or any other IP address entered into the site. Often this information is
associated with where the ISP is located and not the exact location of the person of that IP address.

http://www.ip-adress.com/

http://www.liveipmap.com/

http://geobytes.com/IpLocator.htm

I want to find the exact physical address of an IP.

There is no method of associating an exact physical geographical address or the person associated with
an IP address that an end-user can do. If you'd like to report abuse by a person behind an IP address
contact local authorities or the ISP who's in control of that IP address.

Keep in mind that an IP address could be spoofed or that the user may be behind a proxy and using its IP
address. If behind a proxy, you may also be able to report abuse to the proxy service and they may be
able to track down the real IP address.
How do I hide my IP address?

Question

How can I hide my IP address?

Answer

In order to connect to the Internet and communicate with other computers on the Internet, you must
have a valid and visible IP address. If you're wanting to hide your IP address to keep anonymous, follow
the recommendations in the below link.

 How can I be anonymous on the Internet?

How can I be anonymous on the Internet?

Question

How can I be anonymous on the Internet?

Answer

This document has been created for users who are concerned about
others monitoring their Internet browsing or wish to remain anonymous while they browse the web.
Keep in mind that there are different degrees of anonymity and even following these steps do not
guarantee 100% anonymity. If you're attempting to conceal your identity to do something illegal or
inappropriate while on the Internet, this document is not for you.

Below is a list of different methods to help protect your identity while on the Internet.

Privacy basics

For most users following some basic rules can help with your anonymity on the Internet.

1. Do not disclose any private information, unless absolutely required. In some cases when it is
required such as your last name, only fill in partial information such as your last initial.

2. Don't fall into e-mail and web phishing traps. Become familiar with the signs of phishing and
don't disclose private information in e-mail.
3. If you're using Microsoft Windows, familiarize yourself with Spyware and have at least one
program installed to protect the computer.

 Protecting children from harmful material and people on the Internet.

Public Anonymous Proxy

When browsing the Internet you're browsing from your computer or router assigned IP address, this IP
address can be used to track your general location and can help identify your visit. To help keep your
computer anonymous you can use a web based proxy to browse the web. A web based proxy allows you
to use an alternate computer to load a website and then display the results on your computer through
the browser. Below is a short list of some of the available anonymous web based proxies.

Proxify
Public CGI (Web, PHP) anonymous proxy free list
FreeProxy.ca

If you're in an area where you feel your connection may be compromised or sniffed, e.g. connecting to
the Internet at a WI-FI hotspot. Using a HTTPS proxy is a great way to help encrypt data coming from the
proxy to your computer that is not encrypted, helping to prevent any eavesdropping. If you're using a
proxy web service such as Proxify, you can also use an HTTPS connection.

If you're using Mozilla Firefox as your browser and find yourself frequently needed a proxy, there are
dozens of goodProxy add-ons available.

When using a proxy it is important to realize that the proxy you're using to browse the Internet could
keep a log of visitors, which means if someone really wanted to find you such as law enforcement it may
still be possible. Finally, keep in mind that you will not know who is controlling the proxy so if you're
entering sensitive data such as usernames, passwords, credit card information, etc. or reading your e-
mail that the person in control of the proxy could capture and read that information.

Boot from Anonym.OS LiveCD

Anonym.OS is a LiveCD that allows a user to boot from a CD and use a variant of OpenBSD that has been
designed to help keep a user anonymous while browsing the Internet.

Click here for Anonym.OS site and download

TOR

Tor was originally developed for the U.S. Navy with the purpose of protecting government
communications. Tor works to help protect your privacy by using a network of virtual tunnels to pass
information over the Internet.

Download Tor

Alternate computer or connection


Finally, connecting to the Internet using someone else's connection, e.g. cafe, library, school, work, etc.
can also keep you anonymous. When using someone else's connection you're logging in as their IP
address and not your own personal address.

However, keep in mind that if you had to use a login to access the computer or network, that login could
be traced back to you.

Other software products

In addition to the above recommendations, there are also dozens of other non-free software products
for users who find the above suggestions don't meet their needs. Below is a listing of a few of these
services.

 Anonymizer

 GhostSurf

 Hide My IP

Router

A hardware device designed to take incoming packets, analyzing the packets and then directing them to
the appropriate locations, moving the packets to another network, converting the packets to be moved
across a different network interface, dropping the packets, or performing any other number of other
actions. In the picture to the right, is a Linksys BEFSR11 router and is what most home routers look like.

A router has a lot more capabilities than other network devices such as a hub or a switch that are only
able to perform basic network functions. For example, a hub is often used to transfer data between
computers or network devices, but does not analyze or do anything with the data it is transferring.
Routers however can analyze the data being sent over a network, change how it is packaged and send it
to another network or over a different network. For example, routers are commonly used in home
networks to share a single Internet connection with multiple computers.

In the above example of a home network there are two different examples of a router, the router and
the wireless router. As can be seen in the example the router is what allows all the computers and other
network devices access the Internet. Below are some additional examples of different types of routers
used in a large network.
Brouter

Short for Bridge Router, a "brouter" is a networking device that serves as both a bridge and a router.

Core router

A core router is a router in a computer network that routes data within a network but not between
networks.

Edge router

An edge Router is a router in a computer network that routes data between one or more networks.

Virtual router

A Virtual Router is a backup router used in a VRRP setup.

Wireless router

See the access point definition for further information.

Packet

A term first coined by Donald Davies in 1965, a packet is a segment of data sent from one computer or
network device to another computer or network device over a network. Packets may contain such
information as its source, destination, size and other useful information, helping the packet get to its
destination and then being able to be read once it has arrived. The majority of data that transferred over
the Internet is sent in one or more packets.
Hub

1. When referring to a network, a hub is a basic networking device that connects multiple
computers or other network devices together.

2. In general, a hub refers to a hardware device that enables


multiple devices or connections to be connected to a computer. Another example besides the
one given above is a USB hub, which allows dozens of USB devices to be connected to one
computer, even though that computer may only have a few USB connections. In the picture to
the right, is an example of a USB hub.

Switch

1. A piece of a physical circuitry component that governs signal flow. Having the switch open allows the
signal to flow through, while keeping the switch closed stops the flow and breaks the circuit connection.

2. On a network, a switch is a hardware device that filters and forwards packets through the network,
but often not capable of much more. The first network device that was added to the Internet was a
switch called the IMP, which helped send the first message on October 29, 1969. A network switch is
more advanced than a hub but not as advanced as a router. In the picture to the right, is an example of a
SMC EZ Switch, a 10/100 network switch.

3. A button or lever that can be switched to turn a device on or off.

4. When referring to the switches command, this command is loaded through config.sys and allows you
to add and remove various functions of MS-DOS. See the switches command for further information
about this command.
4. When referring to another command, a switch is an available option that can be used with the
command. For example, the command: "fdisk" can be used with the /MBR switch, using "FDISK
/MBR" would allow the user to recreate the master boot record and not just run the fdisk
program.
Bridge

A computer bridge is a device that connects two local-area networks (LANs), or two segments of
the same LAN. Unlike a router, bridges are protocol -independent. They forward packets
without analyzing and re-routing messages.

Also see: Brouter, Hub, Network definitions, Router, Switch

VRRP
Short for Virtual Router Redundancy Protocol, VRRP is defined by RFC 2338 and is a protocol
used with routers that helps prevent network downtime. In the event of a router failing, the
backup or virtual router would become the master router.

Access point

Alternatively referred to as a base station and wireless router,


an access point is the location of a wireless receiver that enables a user with wireless access to
connect to anetwork or the Internet. This term can refer to both Wi-Fi and Bluetooth devices. In
the image to the right, is a Linksys wireless access point router and an example of what a Wi-Fi
access point may look like. Unlike a traditional router, this router will have one or more
antennas on it to help get the wireless signal.

About assign
Introduced with MS-DOS 2.0 and has been available up to 6.0 where it was removed because of
concern with data issues. Was latter made available on the MS-DOS 6.0, 6.2 and 6.22
supplemental disks. The assign command redirects diskoperation on one drive to a different
drive.
Any users using Windows 95 or above should not use this command and consider using
the SUBST command as a substitute.
Availability
The assign command is an external command file named assign.com and is available in the
below Microsoft operating systems.
MS-DOS 2.0 - 6.0, 6.2, 6.22
Syntax
ASSIGN Source = Target /status
ASSIGN Assign with no switches cancels redirected drive assignments and sets them back to their o

Source Letters of source drives

Target Letters of target drives

/status Lists current drive assignments

Examples
ASSIGN A: = B:
ASSIGN A = B = C - Assigns A as B and B as C.
About subst
Allows you to substitute a folder on your computer for another drive letter.
Availability
The subst.exe command is an external command that is available in the below Microsoft
operating systems.
MS-DOS 3.1x and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Associates a path with a drive letter.
SUBST [drive1: [drive2:]path]
SUBST drive1: /D

drive1: Specifies a virtual drive you want to assign a path.

[drive2:]path Specifies a physical drive and path you want to assign to a virtual drive.
/D Deletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives.


Examples
SUBST a: .
Sets the directory you are in and subdirectories thereafter into the A: drive. So if you were to
type A: after doing this command you would see everything in the directory that you typed this
command in.
If you were to reboot your computer this will clear the SUBST command and put your drives
back to original letters (unless command placed into the autoexec.bat).
You cannot subst network drives and after a drive has been created you cannot give the new
drive a new label.
About assoc
The assoc command displays the file association for each of the different file extensions on the
computer.
Additional information and help with computer file extensions can also be found on our file
extensions page.
Availability
The assoc command is an internal command that is available in the below Microsoft operating
systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or modifies file extension associations
ASSOC [.ext[=[fileType]]]

.ext Specifies the file extension to associate the file type with

fileType Specifies the file type to associate with the file extension

Type ASSOC without parameters to display the current file associations.


If ASSOC is invoked with just a file extension, it displays the current file association for that file
extension. Specify nothing for the file type and the command will delete the association for the
file extension.
Examples
assoc
Displays a file association of each of the file extensions on the computer.
assoc .txt
Displays the file extension for a .txt file as shown below.
.txt=txtfile
Extension ABCs
A computer file extension is commonly a three characters addition that follows the name of a
file. This extension helps IBM compatible computers, such as computers running Microsoft
Windows, to identify what program to associate the file with and how to properly open the file.
This section of Computer Hope has been designed as a location for users to locate what
programs are associated with what file extensions as well as a location to find technical support
for questions regarding computer files and file extensions.
Listing of extensions
Below is a listing of links to the thousands of file extensions and brief descriptions currently
listed on Computer Hope. Click one of the below letters with what the file extension you're
looking for begins with. For example, If you're looking for information about a .EXE file click the
letter E.
#|A|B|C|D|E|F|G|H|I|J|K|L|M
N|O|P|Q|R|S|T|U|V|W|X|Y|Z

About at
Enables users to schedule tasks to be performed at a specified time and date.
Availability
The at.exe command is an external command that is available in the below Microsoft operating
systems.
Windows NT
Windows 2000
Windows XP
Windows 7
Syntax
The AT command schedules commands and programs to run on a computer at a specified time
and date. The Scheduleservice must be running to use the AT command.

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]

AT [\\computername] time [/INTERACTIVE]

[ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\\computername Specifies a remote computer. Commands are scheduled on the


local computer if this parameter is omitted.

id Is an identification number assigned to a scheduled command.

/delete Cancels a scheduled command. If id is omitted, all the scheduled


commands on the computer are canceled.

/yes Used with cancel all jobs command when no further confirmation is
desired.

time Specifies the time when command is to run.

/interactive Allows the job to interact with the desktop of the user who is logged
on at the time the job runs.

/every:date[,...] Runs the command on each specified day(s) of the week or month. If
date is omitted, the current day of the month is assumed.

/next:date[,...] Runs the specified command on the next occurrence of the day (for
example, next Thursday). If date is omitted, the current day of the
month is assumed.

"command" Is the Windows NT command, or batch program to be run.

Examples
at 6:50PM "c:\winnt\task.bat"
Performing this command would run the task.bat file at 6:50PM today unless the task is
scheduled after the time specified. Because the /interactive switch is not in the command, this
batch file will be executed in the background.
at 6:50PM /interactive c:\winnt\beep.bat
Runs the beep.bat batch file at 6:50PM with the ability for the user to interact with the batch
file.
at 1 /delete
Deletes the at ID 1.
at /delete /yes
Delete all AT IDs.
at
Typing at alone will display each of the scheduled tasks, their status, id, scheduled time, and
command as shown below. As you can see if an error occurs with the at process, the status will
display an Error.
Status ID Day Time Command Line ------------------------------------------------------------------------------- 1
Tomorrow 6:50 AM c:\winnt\task.bat 2 Tomorrow 2:48 PM c:\ch\hope\logit.bat Error 3
Tomorrow 6:50 PM start notepad
at 1
Typing at followed by an ID number will display additional information about the task id as
shown below.
Task ID: 5 Status: OK Schedule: Today, Time of day: 6:55 PM Interactive: No Command:
c:\winnt\task.bat

About atmadm
Lists connections and addresses seen by Windows ATM call manager.
Availability
The atmadm command is an internal command that is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Syntax
atmadm [options]
where options are one or more of:
- List all connections
c

- List all registered addresses


a

- Display Statistics
s
Examples
atmadm -c
List the ATM connections (if present), the interface, VCI, VPI and the address.
ATM
1. Short for Asynchronous Transfer Mode, ATM when referring to computers is a dedicated-
connection switching technology that organizes digital data into 53-byte cell units and transmits
them over a physical environment using digital signal technology. ATM is capable of transmitting
at speeds of 155 or 622 MBps and faster.
2. Electronic machine that dispenses money from a persons account at banks. The first U.S. ATM
went into service at 9:00am on September 2, 1969.
3. Shorthand for At The Moment, atm is commonly used in chat based communications. Below are
some examples of how this could be used in chat.
I'm busy ATM.
ATM I'm watching the Simpson's.
About attrib
Attrib allows a user to change the properties of a specified file. Using attrib, the user has the
capability of changing the file to have any of the below attributes. Note if you're wanting to
change the ACL's of a file see the CACLS command.
Read-only - allowing the file to be only viewed and not written to.
Archived - allowing Microsoft backup and other backup programs to know what files to backup.
Hidden - making the file invisible to standard users.
System - making the file an important system file.
Availability
The attrib.exe command is an external command that is available in the below Microsoft
operating systems.
MS-DOS 3.0 and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Microsoft Windows 95, 98, and ME syntax
Displays or changes file attributes.
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/S]

+ Sets an attribute.

- Clears an attribute.

R Read-only file attribute.

A Archive file attribute.

S System file attribute.

H Hidden file attribute.

Processes files in all directories in the


/S specified path.

Microsoft Windows 2000 and Windows XP syntax


Displays or changes file attributes.
ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [[drive:] [path] filename] [/S [/D]]

+ Sets an attribute.
- Clears an attribute.

R Read-only file attribute.

A Archive file attribute.

S System file attribute.

H Hidden file attribute.

Processes files in all directories in the


/S specified path.

/D Process folders as well.

Microsoft Windows 2000 and Windows XP recovery console syntax


Note: The below options are the available options in the Windows recovery console.
Changes attributes on one file or directory.
ATTRIB -R | +R | -S | +S | -H | +H | -C | +C filename

+ Sets an attribute.

- Clears an attribute.

R Read-only file attribute.

S System file attribute.

H Hidden file attribute.

C Compressed file attribute.

Examples
attrib
Typing attrib by itself will display all files in the current directory and each of their attributes. If
any file is hidden it will also display those files.
attrib +r autoexec.bat
Add the read-only attribute to the autoexec.bat file so it cannot be modified until the read only
attribute is taken off. This is helpful for important system files or any other file that you do not
want to have mistakenly edited or changed by another program.
attrib +h config.sys
Add the hidden attribute to the config.sys file causing it to be not be seen by the average user.
attrib -h config.sys
This command will do the opposite of the above command. Instead of hiding the file it will
unhide the file if hidden.
 How can I see hidden files in MS-DOS?
Extended information
DOS directory file attribute bit position and Hex Value with bit positions (7 6 5 4 3 2 1 0). See
the file attributes computer dictionary definition for further information about file attributes.

Bit Positions Hex Description

00000001 01h Read Only file

00000010 02h Hidden file

00000100 04h System file

00001000 08h Volume Label

00010000 10h Subdirectory

00100000 20h Archive

01000000 40h Reserved

10000000 80h Reserved

Examples

00100001 21h Read Only, Archive

00110010 32h Hidden, Subdirectory, Archive

00100111 27h Read Only, Hidden, Archive

About cacls
The cacls command enables a user to view and modify the ACLs of a file. If you're wanting to
change the read/write, hidden, system settings of the file see the attrib command.
Availability
The cacls.exe command is an external command and is available in the below Microsoft
operating systems.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or modifies access control lists (ACLs) of files
CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]]

[/P user:perm [...]] [/D user [...]]

filename Displays ACLs.

/T Changes ACLs of specified files in the current directory and all


subdirectories.

/E Edit ACL instead of replacing it.

/C Continue on access denied errors.

/G Grant specified user access rights.


user:perm Perm can be: R Read

W Write

C Change (write)

F Full control

/R user Revoke specified user's access rights (only valid with /E).

/P user:perm Replace specified user's access rights.


Perm can be: N None

R Read

W Write

C Change (write)
F Full control

/D user Deny specified user access.

Wildcards can be used to specify more that one file in a command. You can specify more than
one user in a command.
Examples
cacls myfile.txt
Displays the ACLs for the myfile.txt file. Below is an example of what this may look like.
C:\WINNT\MYFILE.TXT BUILTIN\Users:R
BUILTIN\Power Users:C
BUILTIN\Administrators:F
NT AUTHORITY\SYSTEM:F

cacls myfile.txt /e /g mrhope:f


Grants the user "mrhope" full rights to the myfile.txt file. If user was to look at the ACLs again
using the above command, they would now see that the mrhope user is in the list.
How can I see hidden files in MS-DOS?
Question
How can I see hidden files in MS-DOS?
Answer
While in the MS-DOS or the Windows command line, navigate to the directory you wish to view
hidden files in and type one of the commands listed below.
attrib
Typing the attrib command alone will display all files in the current directory with their
attributes to the left of the directory path and file name. Files that have an "H" to the left are
hidden files.
attrib | more
If there are too many files to list on one page adding "| more" to the end of the attrib command
will display all files with attributes one page at a time.
attrib *.log
Finally, if you know the name of the file you're looking for or what it contains, adding it with or
without wild characters will display all files with their attributes. For example, the above
command would list any log file (including hidden files) with its attributes.

About backup
MS-DOS application that enables users to backup their data on their computer.
MS-DOS 6.0, 6.2, 6.21, and 6.22 users use the msbackup command. However, this file is still
available to these users on the MS-DOS 6.0 and 6.22 supplemental disk.
Availability
The backup.com / backup.exe commands are external commands that are available in the below
Microsoft operating systems.
MS-DOS 2.x to MS-DOS 5.00a
Backup syntax
MS-DOS 2.x - 5.x syntax
BACKUP [Source:\Path\Filename] [Target:] [/s] [/m] [/a] [/d:date] [/t:time] [/f:size]
[/L:LogDrive:\Path\Log]
Source:\Path\Filename The source, path, and filename of the location of the file that
you wish to backup.

Target: The target drive for the backup file.

/s Makes a backup of all files, directories, and subdirectories in


the specified source location.

/m Backup all files that have changed since the last backup.

/a Adds a new backup file to existing backups instead of


overwriting them.

/d:date Backup files that have been created or modified since the date
specified.

/t:time Backup files that have been created or modified after this time.

/f:size Create backup files in a specific size so they can be saved to an


external storage such as a floppy disk drive.

/L:LogDrive:\Path\Log Create a log of the backup and specify the location of where
the log is to be saved.

Examples
backup c:\work\*.* d: /s
The above example would create a backup of all the files and subdirectories in the work
directory and save the backup to the d: drive.
About msbackup
A later MS-DOS application that enables users to backup their data on their computer.
The msbackup is a MS-DOS version of the new backup command and mwbackup is the Windows
version of this backup program.
MS-DOS 6.0, 6.2, 6.21, and 6.22 users can still find the older backup file on the MS-DOS 6.0 and
6.22 supplemental disk.
Availability
The msbackup.exe and mwbackup.exe commands are external commands that are available in
the below Microsoft operating systems.
MS-DOS 6.0, 6.2 and 6.22
Msbackup syntax
MS-DOS 6.0, 6.2, 6.21, and 6.22syntax
msbackup [setup_file] [/bw] [/lcd] [/mda]
setup_file Option setup file that can be used to specify what files to backup.

/bw Run msbackup in black-and-white mode.

/lcd Run msbackup in LCD screen mode.

/mda Run msbackup in monochrome mode

Examples
msbackup
The above example would run MSBACKUP. Because this program is now a menu driven
program, not many other options or switches are available for this command from the prompt.

About batch
The batch command is a recovery console command that executes a series of commands within
a file.
If you are looking for additional information about batch files we suggest you look at our batch
file page.
Availability
The batch command is a recovery console command that is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Syntax
Executes commands specified in a text file.
BATCH Inputfile [Outputfile]
Inputfile Specifies the text file that contains the list of commands to be executed.

Outputfile If specified, contains the output of the specified commands. If not specified,
the output is displayed on the screen.

Batch cannot be one of the commands included in the Inputfile.


Examples
batch myfile.txt
In the above example, the batch command would run through each of the commands in the
myfile.txt file and display the output to the screen.
Recovery console
An available mode for Microsoft Windows 2000 and Windows XP users that can be accessed by
booting from the Windows 2000 or Windows XP CD. The recovery console enables users
to recover their Windows computer from any serious issues.
 How to use the Windows recovery console.
Below is a listing of some of the available recovery console commands listed on our database.
These commands can only be accessed through the recovery console and are not available
through the standard MS-DOS prompt.
Attrib Enable Md
Batch Exit Mkdir
Bootcfg Expand More
Cd Fixboot Rd
Chdir Fixmbr Ren
Chkdsk Format Rename
Cls Help Rmdir
Del Listsvc Set
Delete Logon Type
Dir Map Systemroot
Disable
Diskpart
About bootcfg
The bootcfg command is a recovery console command that enables a user to rebuild, view, and
otherwise make changes to the boot.ini file.
Additional information and help with the boot.ini file can be found on document CH000492.
Availability
The bootcfg command is a recovery console command that is available in the below Microsoft
operating systems.
Windows XP
Windows Vista
Windows 7
Synatx
Use the BOOTCFG command for boot configuration and recovery
BOOTCFG /ADD
BOOTCFG /REBUILD
BOOTCFG /SCAN
BOOTCFG /LIST
BOOTCFG /DISABLE
BOOTCFG /REDIRECT [PORT BAUDRATE] | [useBiosSettings]
/SCAN Scan all disks for Windows installations and display the results.

/ADD Add a Windows installation to the boot list.

/REBUILD Iterate through all Windows installations and allow the user to
choose which to add.

/DEFAULT Set the default boot entry.

/LIST List the entries already in the boot list.

/DISABLEREDIRECT Disable redirection in the boot loader.

/REDIRECT Enable redirection in the boot loader with the specified


configuration.
Example:
bootcfg /redirect com1 115200
bootcfg /redirect useBiosSettings

Examples
bootcfg /rebuild
The above example would start the step-through for the creation of a new boot.ini on the
computer. Additional steps and information about the process of rebuilding the boot.ini can be
found on document CH000648.
Additional information and help with the boot.ini.
Issue
Additional information and help with the boot.ini.
Additional information
The "boot.ini" is a Microsoft initialization file found on the Microsoft Windows NT, Microsoft
Windows 2000, and Microsoft Windows XP operating systems. This file is always located on
the root directory of the primary hard disk drive. In other words, it is located at C:\ directory or
the C Drive. This file is used by Microsoft Windows as a method of displaying a menu
of operating systems currently on the computer and allowing the user to easily select what
operating system to load. In addition, this file is also used to point to the locations of each of the
operating systems.
How to view the boot.ini
Examples of the boot menu
Basic example of the boot.ini file
How to modify the boot.ini
Available boot.ini switches
How to rebuild the boot.ini
How to view the boot.ini
The boot.ini can be viewed and some options can be changed by following the below steps.
1. Click Start, Run
2. In the run line type: msconfig and press enter.
3. Click the boot.ini tab.
If you have an option in the boot menu that doesn't work, such as a missing version of
Windows. Try clicking the "Check All Boot Paths" button in the boot.ini to fix this issue without
having to manually edit the boot.ini as instructed below.
Example of the boot menu
If multiple operating systems are setup in the boot.ini, as the computer is booting you will see a
menu similar to the below example. This allows the user to select between multiple operating
systems. If your computer does not have multiple operating systems, but this menu still appears
each time your computer boots, it is likely that your boot.ini is improperly configured.
Please select the operating system to start:
Microsoft Windows XP Home Edition
Microsoft Windows 2000
Use the up and down arrow keys to move the highlight to your choice.
Press ENTER to choose.

For troubleshooting and advanced startup options for Windows, press F8.

Basic example of the boot.ini file


[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Home Edition"
/fastdetect
In the above example, the boot.ini contains two sections, the [boot loader], and [operating
systems]. Within the boot loader section there are two lines. The "timeout" line is used for how
long the boot menu time should be displayed, in seconds; we recommend that the timeout be
set to at least five if you wish the computer to boot faster and commonly use the default
operating systems. The "default" line is the default operating system that the boot.ini will load.
If multiple operating systems are in the boot.ini, the default operating system will be
automatically selected and used if the user does not specify a different operating system by the
time the timeout value expires.
The next section, or the "operating system" section, is used to list and specify the location of
each of the operating systems installed on the computer. Below is a listing of each of the
options.

Option Description

multi(x) This option is used with IDE and ESDI drives and is also used with SCSI drives for comp
the above example is "0", this number is the adapter's number and should always be "
load system files.
 In a computer using only IDE this option will work with up to four hard disk drives.
 In a computer using only SCSI this option will work with the first two drives on the prim
 Finally, if a computer is using IDE and SCSI this option will work with the IDE drives on

scsi(x) If the computer has a SCSI controller and is not using BIOS to load the system files, the
"multi(x).

disk(x) The disk on the controller. If multi(x) is used used, this value will always be 0. Howeve
address.

rdisk(x) Which disk on the controller is being used. In the above example we are using an rdisk
the primary controller is being used. This value may be between "0" and "3" and is alw

partition(x) Which partition the operating system is on. In the above example, the operating syste

\WINDOWS="..." Finally, the last portion of this line defines the directory of where windows is located a
operating system. In the above example, the boot menu would display "Microsoft Win

How to modify the boot.ini


The boot.ini file is a hidden system file located in the root directory of your primary hard disk
drive. To edit this file we recommend you follow the below steps.
1. From Windows, open an MS-DOS prompt by clicking "Start" and then "Run" and typing "cmd" in
the text box. If you are not able to get into a MS-DOS prompt to edit the boot.ini file, boot into
the recovery console to edit the file.
2. At the MS-DOS prompt, type:

c: <press enter>
cd\ <press enter>
attrib -r -a -s -h boot.ini <press enter>
edit boot.ini <press enter>
 Additional information about the attrib command can be found on our attrib help page.
 Additional information about the edit command can be found on our edit help page.
Available boot.ini switches
Below is a listing of available boot.ini switches and a brief explanation. These switches can can
be used to help setup or troubleshoot a computer.

Switch Description

/basevideo Causes the operating system to use a standard VGA display when booting into the operat

/bootlog Creates a log file named ntbtlog.txt of the computer booting.

/burnmemory Causes the operating system to ignore the memory specified after the switch. For exampl
system to ignore 64MB of physical memory.

/debug Causes the kernel debugging to be enabled.

/fastdetect Causes NTDETECT to not detect serial and parallel devices and instead let Plug and Play h

/maxmem Limit the operating system to use the maximum memory of what the user specifies. For e
operating system to use a maximum of 32MB.

/noguiboot Microsoft Windows 2000 and above switch that, if enabled, will not load the graphics driv
starting

/nopae Microsoft Windows 2000 switch that disables the computer's ability to utilize Intel Physic

/numproc Instructs the operating system on how many processors it is capable of using.

/onecpu Causes the operating system to utilize one of the processors in a multi-processor comput

/pae Microsoft Windows 2000 switch that enables the computer to utilize Intel Physical Addre

/pcilock Prevents the operating system from automatically assigning IO/IRQ resources to PCI devic

/safeboot Boot the computer safely (Safe Mode). This mode can be easily accessed without modifyi
computer is booting.

/sos Causes the operating system to print out information as it being processed.

/w95 Used when booting Windows 95 or Windows 98.


/w95dos Used when booting MS-DOS.

/year Option used to cause the operating system to ignore the year provided by systems the re
specified after the switch. For example, a user may type /year=2003.

How to rebuild the Windows boot.ini.


Question
How to rebuild the Windows boot.ini.
Answer
Users who have a corrupt or missing boot.ini file, are running Microsoft Windows XP, and have a
Microsoft Windows XP CD can rebuild the systems boot.ini file by following the below steps.
1. Insert the Microsoft Windows XP CD into the computer. Note: If you have a system recovery CD
or restore CD (not a Microsoft CD) these steps will likely not work for your computer.
2. Reboot the computer with the CD and press any key when prompted to press any key to boot
from the CD.
3. Once in the Microsoft Setup menu press R to open the recovery console.
4. Select the operating system you wish to use; if you only have Windows XP on the computer you
will only have one prompt.
5. Once prompted for the password enter the Admin password and press enter.
6. Once at the command prompt type bootcfg /rebuild to start the rebuild process.
7. The rebuild process will step you through a number of steps depending upon how many
operating systems you have on the computer and how the computer is setup. Below is a listing
of the common steps you are likely going to encounter.

* Prompt for the identified versions of Windows installed. When you receive this prompt press
Y if the bootcfg command properly identified each of the Windows operating systems installed
on the computer. It is important to realize this command will only detect Windows XP, Windows
2000, and Windows NT installations.

* Prompt to enter the load identifier. This is the name of the operating system for the boot.ini.
For example, Microsoft Windows XP Home users would enter Microsoft Windows XP Home
edition.

* Prompt to Enter OS load options. When this prompt is received type /fastdetect to
automatically detect the available options.
8. Once you have completed all the available options in the rebuild and are back at the
prompt type exit to reboot the computer.

About break
Break can be used to enable or disable the breaking capability of the computer. For example, if a
user wanted to cancel a batch file or another MS-DOS processes, that user could press CTRL + C
(break), which would then prompt the user if they wish to cancel the current process.
Turning break off will cancel CTRL + C; however, the user will still be able to press CTRL +
PAUSE/BREAK and have the capability of getting out of a batch file / current running process.
Note: Newer versions of Windows (Windows ME, Windows 2000, Windows XP, and higher) only
include this command for backwards compatibility and turning the break off has no effect.
Availability
The break command is an an internal command and is available in the below Microsoft
operating systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Sets or clears extended CTRL+C checking.
BREAK [ON | OFF]
Type BREAK without a parameter to display the current BREAK setting.
Examples
break on
Turns on the break, which allows the Ctrl + C function.
break off
Turns off the break, not allowing Ctrl + C to cancel a process.
About cacls
The cacls command enables a user to view and modify the ACLs of a file. If you're wanting to
change the read/write, hidden, system settings of the file see the attrib command.
Availability
The cacls.exe command is an external command and is available in the below Microsoft
operating systems.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or modifies access control lists (ACLs) of files
CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]]

[/P user:perm [...]] [/D user [...]]

filename Displays ACLs.

/T Changes ACLs of specified files in the current directory and all


subdirectories.

/E Edit ACL instead of replacing it.

/C Continue on access denied errors.

/G Grant specified user access rights.


user:perm Perm can be: R Read

W Write

C Change (write)

F Full control

/R user Revoke specified user's access rights (only valid with /E).

/P user:perm Replace specified user's access rights.


Perm can be: N None

R Read

W Write

C Change (write)

F Full control

/D user Deny specified user access.

Wildcards can be used to specify more that one file in a command. You can specify more than
one user in a command.
Examples
cacls myfile.txt
Displays the ACLs for the myfile.txt file. Below is an example of what this may look like.
C:\WINNT\MYFILE.TXT BUILTIN\Users:R
BUILTIN\Power Users:C
BUILTIN\Administrators:F
NT AUTHORITY\SYSTEM:F

cacls myfile.txt /e /g mrhope:f


Grants the user "mrhope" full rights to the myfile.txt file. If user was to look at the ACLs again
using the above command, they would now see that the mrhope user is in the list.
About call
Enables a user to execute a batch file from within another batch file.
Availability
The call command is an internal command and is available in the below Microsoft operating
systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
MS-DOS, Windows 95, Windows 98, Windows ME call syntax
Calls one batch program from another.
CALL [drive:][path]filename [batch-parameters]
batch-parameters specifies any command-line information required by the batch program.
Windows 2000 and Windows XP call syntax
Calls one batch program from another.
CALL [drive:][path]filename [batch-parameters]
If Command Extensions are enabled, CALL changes as follows:
CALL command now accepts labels as the target of the CALL. The syntax is:
CALL :label arguments
A new batch file context is created with the specified arguments and control is passed to the
statement after the label specified. You must "exit" twice by reaching the end of the batch script
file twice. The first time you read the end, control will return to just after the CALL statement.
The second time will exit the batch script. Type GOTO /? for a description of the GOTO :EOF
extension that will allow you to "return" from a batch script.
In addition, expansion of batch script argument references (%0, %1, etc.) have been changed as
follows:
%* in a batch script refers to all the arguments (e.g. %1 %2 %3 %4 %5 ...)
Substitution of batch parameters (%n) has been enhanced. You can now use the below optional
syntax:
%~1 - expands %1 removing any surrounding quotes (")

%~f1 - expands %1 to a fully qualified path name

%~d1 - expands %1 to a drive letter only

%~p1 - expands %1 to a path only

%~n1 - expands %1 to a file name only

%~x1 - expands %1 to a file extension only

%~s1 - expanded path contains short names only

%~a1 - expands %1 to file attributes

%~t1 - expands %1 to date/time of file

%~z1 - expands %1 to size of file

%~$PATH:1 - searches the directories listed in the PATH


environment variable and expands %1 to the fully
qualified name of the first one found. If the
environment variable name is not defined or the
file is not found by the search, then this
modifier expands to the empty string

The modifiers can be combined to get compound results:


%~dp1 - expands %1 to a drive letter and path only

%~nx1 - expands %1 to a file name and extension only

%~dp$PATH:1 - searches the directories listed in the PATH


environment variable for %1 and expands to the
drive letter and path of the first one found.

%~ftza1 - expands %1 to a DIR-like output line


In the above examples, %1 and PATH can be replaced by other valid values. The %~ syntax is
terminated by a valid argument number. The %~ modifiers may not be used with %*
Examples
call second.bat
Executes the second.bat batch file batch file from within another batch file.

Batch file ABCs


Batch files allow MS-DOS and Microsoft Windows users to create a lists of commands to run in
sequence once the batch file has been executed. For example, a batch file could be used to run
frequently run commands, deleting a series of files, moving files, etc. A simple batch file does
not require any special programming skills and can be done by users who have a basic
understanding of MS-DOS commands.
A good example of a batch file for someone who is more familiar with Windows or the MacOS is
to think of a batch file as a shortcut in Windows or an icon on the MacOS. Much like a shortcut,
batch files could be used to run one or more commands or programs through the command
line.
Another example of a very well known batch file is the autoexec.bat, which is a simple boot file
loaded each time the computer is loaded on MS-DOS and early Windows computers. This batch
file contained all the necessary commands and programs used to run MS-DOS and Windows
each time the computer booted.
Creating a batch file
MS-DOS users
Microsoft Windows and other users
MS-DOS users
To create a basic batch file in MS-DOS, follow the below steps that give you an example of how
to create a basic batch file.
1. Open an MS-DOS command window or get to MS-DOS.
2. At the MS-DOS prompt, type: edit test.bat and press enter.
3. If typed properly, you should now be in a blue screen. Within the screen, type:

pause
dir c:\windows
dir c:\windows\system
4. Once the above three lines have been typed in, click File and choose exit; when prompted to
save, click "Yes." Users who do not have a mouse cursor can accomplish this same task by
pressing ALT+F to access the file menu, then pressing "X" to exit, and pressing enter to save
changes.
5. Once you are back at the MS-DOS prompt, type: test and press enter. This will execute the
test.bat file and begin running the file. Because the first line is pause, you will first be prompted
to press a key. Once you press a key the batch file will run line-by-line; in this case, listing the
files in the windows and windows\system directories.
If you wish to add more lines to this batch file you would type "edit test.bat" to edit the file
again.
Additional information about the MS-DOS edit command can be found on our edit command
page. Some versions of MS-DOS and bootable diskettes may not have the edit command; if this
is the case, you would either need to obtain the edit.com file to access this file or use the copy
con command.
Microsoft Windows and other users
A Windows user can still use the above MS-DOS steps if they wish to create a batch file. If,
however, you're more comfortable using Microsoft Windows or your operating system, you can
use any text editor, such as Notepad orWordpad, to create your batch files, as long as the file
extension ends with .bat. In the below example we use the Windows notepad to create a batch
file.
1. Click Start
2. Click Run
3. Type: notepad and press enter.
4. Once notepad is open, type the below lines in the file or copy and paste the below lines into
notepad.

@echo off
echo Hello this is a test batch file
pause
dir c:\windows
5. Click File and click Save; browse to where you want to save the file. For the file name, type
"test.bat", and if your version of Windows has a "Save as type" option, choose "All files",
otherwise it will save as a text file. Once all of this has been done click the Save button and exit
notepad.
6. Now, to run the batch file, double-click or run the file like any other program. Once the batch
file has completed running it will close the window automatically.
Batch commands
Just like all MS-DOS commands, all batch file commands are not case sensitive. However, in the
below listing we have listed all commands in all caps to help you identify what is a command
and what is not.
@ Does not echo back the text after the at symbol. This is most commonly used
as @ECHO OFF to prevent any of the commands in the batch file from being
displayed, just the information needed.

%1 The percent followed by a numeric value, beginning with one, allows users to
add variables within a batch file. The below line is an example of what can be
used in a batch file.
ECHO Hello %1
When the above one-line batch file is created, add your name after the batch
file. For example, typing myname (being the name of the bat file) and then
your name:
myname bob
would output:
Hello bob
Note: This can be extended to %2, %3, and so on.

:: One of two ways of adding remarks into the batch file without displaying or
executing that line when the batch file is run. Unlike REM this line will not
show regardless if ECHO off is in the batch file.

:LABEL By adding a colon in front of a word, such as LABEL, you create a category,
more commonly known as a label. This allows you to skip to certain sections
of a batch file such as the end of the batch file. Also see GOTO.

CALL This is used to run another batch file within a batch file. When the batch file
that is called is completed, the remainder of the original batch file is
completed. Note if the batch file does not exist it will give an error message.

CHOICE See running different programs for an example of how to use this command.
 Additional information and the syntax of this command in each version of
Windows and MS-DOS can be found on our CHOICE command page.

CLS Just like the DOS command would clear your screen.
 Additional information and the syntax of this command in each version of
Windows and MS-DOS can be found on our CLS command page.

ECHO Will echo a message in the batch file. Such as ECHO Hello World will
print Hello World on the screen when executed. However, without @ECHO
OFF at the beginning of the batch file you'll also get "ECHO Hello World" and
"Hello World." Finally, if you'd just like to create a blank line,
type ECHO. adding the period at the end creates an empty line.

EXIT Exits out of the DOS window if the batch file is running from Windows.
 Additional information and the syntax of this command in each version of
Windows and MS-DOS can be found on our EXIT command page.

GOTO Used to go to a certain label, such as LABEL. An example of GOTO would be to


LABEL GOTO END. For an example of this see running different programs.
 Additional information and the syntax of this command in each version of
Windows and MS-DOS can be found on our GOTO command page.

IF Used to check for a certain condition if the condition exists. If that condition
exists it will perform that function. To see an example of this see running
different programs.
 Additional information and the syntax of this command in each version of
Windows and MS-DOS can be found on our IF command page.

PAUSE Prompt the user to press any key to continue.

REM One of two ways of adding remarks into the batch file without displaying or
executing that line when the batch file is run.

SHIFT Changes the position of replaceable parameters in a batch program.


 Shift command help and syntax information.

START Used for Windows 95, Windows 98, and Windows NT 4.0 and above to start a
windows application; such asSTART C:\WINDOW\CALC would run the
Windows Calculator. Users running Windows 3.x need to utilize the WIN
command. For example, WIN C:\Windows\CALC.EXE would run Windows
and then Calculator after Windows has finished loading.
 Start command help and syntax information.

Batch file examples


Running different programs
How to start Windows files and programs from a batch file
Creating a batch file delay
How to make a time log
Running different programs
Below is a simple example of how you can implement the choice options into your batch files.
Each line that is in red can be left out of the batch file. They have been included to help explain
some of what the batch file means. Windows 2000and Windows XP users will need to substitute
the choice command with the set command; see the set command page for additional help and
information with this command.
@ECHO OFF
REM - LABEL INDICATING THE BEGINNING OF THE DOCUMENT.
:BEGIN
CLS
REM - THE BELOW LINE GIVES THE USER 3 CHOICES (DEFINED AFTER /C:)
CHOICE /N /C:123 PICK A NUMBER (1, 2, or 3)%1
REM - THE NEXT THREE LINES ARE DIRECTING USER DEPENDING UPON INPUT
IF ERRORLEVEL ==3 GOTO THREE
IF ERRORLEVEL ==2 GOTO TWO
IF ERRORLEVEL ==1 GOTO ONE
GOTO END
:THREE
ECHO YOU HAVE PRESSED THREE
GOTO END
:TWO
ECHO YOU HAVE PRESSED TWO
GOTO END
:ONE
ECHO YOU HAVE PRESSED ONE
:END
How to start Windows files and other programs from a batch file
To run Microsoft Windows programs or files use the START command. The below example
would run Windows Notepad.
START /MAX NOTEPAD
You can also specify the direct location of the file by typing the below command.
START /MAX C:\Windows\NOTEPAD.EXE
*Windows users who have a different directory (e.g. Windows 2000 users) would need to
substitute WINNT or the name of their directory in place of Windows in the above example.
The /m representing it to start the window Maximized. See the start command page for
additional information about this command.
Creating a batch file delay
Below is an example of how to delay a batch file any where from 5 to 99 seconds. In the below
example we illustrate a 5 second delay.
TYPE NUL | CHOICE.COM /N /CY /TY,5 >NUL
Additionally, you could use the sleep file found on our utility download section.
How to make a time log in a batch file
The below example demonstrates how to create a time log of when the batch file is loaded, or
for example, this could be used in the autoexec.bat when someone logs into a computer that
supports this file.
ECHO. |TIME > TIME
COPY LOG +TIME
An alternate, slightly more complicated method that, to our knowledge, cannot be used in
Windows NT, Windows 2000 or Windows ME would be the following:
echo @prompt set date=$d$_set time=$t$h$h$h > {a}.bat
%comspec% /e:2048 /c {a}.bat > {b}.bat
for %%v in ({b}.bat del) do call %%v {?}.bat
echo %date% %time% >> log
Another alternative is:
echo. |time |find "current" >> log
For the above batch file to work properly you must create a file called log, by typing edit log and
then save and exit the file, creating a 0 bytes file. If this file is not created or not created
properly you will receive the error message Content of destination lost before copy.

About cd
CD (Change Directory) is a command used to switch directories in MS-DOS. For example, if you
needed to run Windows 3.11 from DOS, you would type:
cd windows - Changing the directory to Windows;
win - To run the win.com file within the windows directory.
Availability
The CD command is an internal command and is available in the below Microsoft operating
systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Windows XP and later syntax
CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]
.. Specifies that you want to change to the parent directory.
Type CD drive: to display the current directory in the specified drive.
Type CD without parameters to display the current drive and directory.
Use the /D switch to change current drive in addition to changing current directory for a drive.
If Command Extensions are enabled CHDIR changes as follows:
The current directory string is converted to use the same case as the on disk names. So CD
C:\TEMP would actually set the current directory to C:\Temp if that is the case on disk.
CHDIR command does not treat spaces as delimiters, so it is possible to CD into a subdirectory
name that contains a space without surrounding the name with quotes. For example:
cd \winnt\profiles\username\programs\start menu
is the same as:
cd "\winnt\profiles\username\programs\start menu"
which is what you would have to type if extensions were disabled.
Windows 98 and earlier syntax
CHDIR [drive:][path]
CHDIR[..]
CD [drive:][path]
CD[..]
Examples
cd\
Goes to the highest level, the root of the drive.
cd..
Goes back one directory. For example, if you are within the C:\Windows\COMMAND> directory,
this would take you to C:\Windows>
Windows 95, 98, and later versions have a feature in the CD command that allows you to go
back more than one directory when using the dots. For example, typing: cd... with three dots
after the cd would take you back two directories.
cd windows
If present, would take you into the Windows directory. Windows can be substituted with any
other name.
cd\windows
If present, would first move back to the root of the drive and then go into the Windows
directory.
cd\windows\system32
If present, would move into the system32 directory located in the Windows directory. If at any
time you need to see what directories are available in the directory you're currently in use
the dir command.
cd /d e:\pics
If for example you were on the C: drive, typing the above command with the /d option would
first switch the the E: drive letter and then move into the pics directory.
cd
Typing cd alone will print the working directory. For example, if you're in c:\windows> and you
type the cd it will print c:\windows. For those users who are familiar with Unix / Linux this could
be thought of as doing the pwd (print working directory) command.
Difference between cd .. and cd\ or cd / commands
Question
Difference between cd .. and cd\ or cd / commands.
Answer
MS-DOS and Windows command line users
Linux and Unix users
MS-DOS and Windows command line users
When typing the cd.. or cd .. command this moves the directory back one directory also known
as the parent directory. As seen in the below example, if you're in the \Windows\System32
directory using the cd.. command takes you back to the Windows directory.
C:\Windows\System32>cd..

C:\Windows>
You can also type three or more periods in a row to move back multiple directories. For
example, type: cd... will move back two directories.
The cd\ command takes you back to the root directory of the current drive. As can be seen in
the below example, if we were in the same \Windows\System32 directory and typed the cd\
command it would take you to the C:\ directory.
C:\Windows\System32>cd\

C:\>
You can also type the path after the cd\. For example, if you wanted to get to the
C:\Windows\Temp directory you could type: cd\windows\temp to get into that directory
regardless of where you are on the C: drive.
Linux and Unix users
When typing the cd .. command (need to have a space between cd and ..) this moves the
directory back one directory also known as the parent directory. As seen in the below example,
if you're in the /public_html/cgi-bin directory using the cd.. command takes you back to the
public_html directory.
[~/public_html/cgi-bin]# cd ..

[~/public_html]#
The cd / command takes you back to the root directory of the current drive. As can be seen in
the below example, if we were in the same /public_html/cgi-bin directory and typed the cd /
command it would take you to the / directory.
[~/public_html/cgi-bin]# cd /

[/]#
Unless you have root rights or proper permissions you will be unable to list the files in this
directory. If you want to get to the root home directory (~) type: cd ~ at the prompt.
About chcp
Before the chcp command can be used, the nlsfunc must be loaded, as well as the country.sys
must be loaded into theconfig.sys.
The chcp command is used to supplement the International keyboard and character set
information, allowing MS-DOS to be used in other countries and with different languages.
Availability
The chcp.com command is an external command that is available in the below Microsoft
operating systems.
MS-DOS 6.22 and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Country / regions
Keybrd2.sys Country/Regions
274, 275 - Brazil
442 - Bulgaria
319 - Greece
161 - Iceland
118 - Macedonia / Serbia / Montenegro
333 - Romania
441 - Russian
440, 179 - Turkish
Code pages
EGA.CPI Codepages
437 - United States
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
860 - Portuguese
863 - Canadian-French
865 - Nordic
EGA2.CPI Codepages
737 - Greek II
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
857 - Turkish
861 - Greek
EGA3.CPI Codepages
437 - United States
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
855 - Cyrillic I
866 - Russian (Cyrillic II)
Syntax
Displays or sets the active code page number.
CHCP [nnn]
nnn Specifies a code page number.
Type CHCP without a parameter to display the active code page number.
Examples
chcp
Display the page number.
chcp 447
Sets the active page to 447.
How to load
Note: If you are using MS-DOS, you would want to substitute c:\windows\command with c:\dos
in the below examples.
Autoexec.bat
country=354,861; c:\windows\command.country.sys
Device=c:\windows\command\display.sys con=(,,2)
Config.sys
mode con cp prepare=((861 850) c:\windows\command\ega2.cpi)
mode con cp select=861
keyb is,,c:\windows\command\keybrd2.sys
About the autoexec and config
The autoexec.bat and the config.sys were files created for MS-DOS and Windows 3.x as an easy
solution of loading the files required for various devices as well as the operating system to
properly run. These files are required for later revisions of MS-DOS and Windows 3.x to load.
Because Microsoft is trying to steer away from MS-DOS, these files are not required
for Windows 95, Windows 98, Windows NT, Windows ME, Windows 2000, Windows XP, or later
operating systems. However, in some cases it may still be necessary for users to edit or
configure these files.
How to edit the files
The auotexec.bat and the config.sys are most commonly edited by the MS-DOS command
file Edit. To edit these files, type edit c:\autoexec.bat to edit the autoexec.bat file, or edit
c:\config.sys to edit the config.sys file. If the mouse drivers are not loaded properly you will not
have the capability of navigating the mouse.
If you have Windows 95, Windows 98, or later versions of Windows it is recommended that you
use the syseditcommand; to run this program, click Start / Run and type sysedit.
Remarking information
Remarking lines within the autoexec.bat or the config.sys allows you to temporarily or
permanently prevent a line from loading each time you boot the computer. This is done by
placing "REM " in front of the line you wish to skip.
If you are encountering issues with a line in the autoexec.bat it is highly recommended that you
remark the line instead of removing it. This will prevent issues from arising if the line needs to
be placed back into the autoexec.bat.
Getting additional memory
The below commands will help allow your computer to load programs into memory more
efficiently allowing you to have more memory for MS-DOS programs / games.
Make sure you have the below three lines at the beginning of your config.sys file.
DEVICE=C:\Windows\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\Windows\EMM386.EXE NOEMS
By placing the DOS=HIGH,UMB on the second line, this can, in some cases, save memory
because it is loading DOS into upper memory before loading the memory manager. Additionally,
the first and third lines cannot be loaded into high memory because these lines are the memory
managers.
Load all your devices in your config.sys and autoexec.bat into high memory.
Autoexec.bat layout
Below is an example of what an autoexec may look like.
@echo off
SET SOUND=C:\PROGRA~1\CREATIVE\CTSND
SET BLASTER=A220 I5 D1 H5 P330 E620 T6
SET PATH=C:\Windows;C:\
LH C:\Windows\COMMAND\MSCDEX.EXE /D:123

Command Explanation

@echo off Tells DOS to just read the lines but don't
echo them back to the screen.

SET This example is for the particular sound


SOUND=C:\PROGRA~1\CREATIVE\CTSND card that we have in one of the machines
that we have. The set sound is telling the
computer to send all sound events that the
computer may run to that directory.

SET BLASTER=A220 I5 D1 H5 P330 E620 Tells the computer to set the sound blaster
T6 settings. This is a good line
for game players; if you have this line in
your autoexec.bat you will know all
settings players; if you have this line in
your autoexec.bat you will know all
settings for your sound card. A220 = port
address "220", I5 = IRQ 5, D1 = DMA 1
usually being the settings you will need for
any game out on the market.

SET PATH=C:\Windows;C:\ Sets the computer to look in the


C:\windows directory or the root if a
command used at the prompt is not found.

LH Line used for the CD-ROM. If you have


C:\Windows\COMMAND\MSCDEX.EXE Windows 95+, the MSCDEX will always be
/D:123 in the C:\Windows\COMMAND. In
Windows 3.x or DOS, this will usually be
either in C:\DOS or C:\Windows directory.
The /D:123 is the name of the driver name
that loads in upper memory; this can be
anything, usually /D:MSCD0001. However,
this is not an actual driver, this is just the
name for the driver. Ensure if you change
this line that you change it in the config.sys
on your CD-ROM line. If the two are not
the same, your CD-ROM drive will not
load.

LH C:\MOUSE\MOUSE.EXE Loads the mouse driver into memory.


However, not all mice use the same
drivers. Although the mouse may use
mouse.exe it could also be "mouse.com"
or "mouse.sys", which is loaded in the
config.sys.

C:\DOS\SMARTDRV.EXE /X Loads the smartdrive disk cache utility into


memory. See the smartdrv command
page for additional information about this
utility.

DOSKEY Simple dos command to load DOSKEY into


memory so when in DOS you can use it
without having to load it.

CLS MS-DOS command to clear screen.

WIN Used for users using Windows 3.x, this line


will load Windows automatically when
booting the computer.

Config.sys layout
Below is an example of what the config.sys may look like:
DEVICE=C:\Windows\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\Windows\EMM386.EXE NOEMS
FILES=30
STACKS=0,0
BUFFERS=20
DEVICEHIGH=C:\Windows\COMMAND\ANSI.SYS
DEVICEHIGH=C:\MTMCDAI.SYS /D:123

Command Explanation

DEVICE=C:\Windows\HIMEM.SYS The Himem.sys line is a very


important line; this line will allow
you to load drivers into high
memory. If this line is not present,
Windows 3.x will not load.

DOS=HIGH,UMB This line will load DOS into high


memory in an upper memory
block. Note the location usually
best placed after the HIMEM.SYS.

DEVICE=C:\Windows\EMM386.EXE NOEMS The EMM386 line loads the


extended memory manager.
However, some older MS-DOS
games have problems with
extended memory and will not run
without the NOEMS statement.

FILES=30 The files line allow Windows to


load 30 files at the same time.
Usually, however, going higher
may decrease the computer's
performance; 30 is found to work
the best. Also ensure that this line
is all as one line and that there is
not a space between and after the
=.

STACKS=0,0 The stacks line was first used in


MS-DOS 3.2 and was used to swap
the stack whenever an
asynchronous hardware interrupt
occurred. Later in MS-DOS 3.3 the
line STACKS=0,0 was added into
the config.sys. In special
circumstances, this line was
changed to STACKS=9,128.
The STACKS statement has a range
of 8-64, 32-512. If a higher value is
entered you will receive a FATAL :
Internal Stack Failure, System
Halted error message.

BUFFERS=20 Buffers line is to load buffers into


memory allowing Windows to load
memory.

DEVICEHIGH=C:\Windows\COMMAND\ANSI.SYS The ansi.sys line is a driver for DOS


to allow you to have different
colors / sizes and special
characters at the DOS prompt.

DEVICEHIGH=C:\MTMCDAI.SYS /D:123 This line is the name of the CD-


ROM driver on the particular
system we are working on. The
/D:123 represents the name of the
driver, which in this case is named
123, however, can be named
anything, usually MSCD0001. Note,
however, that /D:123 must be
exactly the same in config.sys and
autoexec.bat; if they are different,
the CD-ROM will not work in DOS.

LASTDRIVE= Allows you to specify the last drive


installed on the computer. It is not
recommended this line be used
unless you are using Windows 3.11
or below. This line can cause issues
with Windows 95 & 98 and will
generally be remarked by
Windows automatically.

FCBS= Line used to specify the number of


file-control blocks for file sharing.
This line should only be used when
programs require it, and today, is
generally not used or required.
FCBS can utilize between 1 and
255.

About chdir
Chdir (Change Directory) is a command used to switch directories in MS-DOS.
Availability
The chdir command is an internal command and is available in the below Microsoft operating
systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
CHDIR [drive:][path]
CHDIR[..]
CD [drive:][path]
CD[..]
Examples
chdir\
Goes to the highest level, the root of the drive.
chdir..
Goes back one directory. For example, if you are within the C:\Windows\COMMAND> directory,
this would take you to C:\Windows>
Windows 95, Windows 98 and later versions of windows allow you to go back more than one
directory by using three or more dots. For example, typing chdir... with three dots after the cd
would take you back two directories.
cdhdir windows
If present, would take you into the Windows directory. Windows can be substituted with any
other name.

About chkdsk
Chkdsk is a utility that checks the computer's hard disk drives' status for any cross-linked or any
additional errors with the hard disk drive.
MS-DOS versions 2.x - 4.x used chkdsk.com,
MS-DOS versions 5.x and beyond used chkdsk.exe.
Availability
The chkdsk command is an external command and is available in the below Microsoft operating
systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
MS-DOS, Windows 95, Windows 98, Windows ME chkdsk syntax
Checks a disk and displays a status report.
CHKDSK [drive:][[path]filename] [/F] [/V]

[drive:][path] Specifies the drive and directory to check.

filename Specifies the file(s) to check for fragmentation.

/F Fixes errors on the disk.

/V Displays the full path and name of every file on the disk.

Type CHKDSK without parameters to check the current disk.


Windows 2000 and Windows XP chkdsk syntax
Checks a disk and displays a status report.
CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]
volume Specifies the drive letter (followed by a colon), mount point, or volume name.

filename FAT only: Specifies the files to check for fragmentation.

/F Fixes errors on the disk.

/V On FAT/FAT32: Displays the full path and name of every file on the disk.

/R Locates bad sectors and recovers readable information (implies /F).

NTFS only: Changes the log file size to the specified number of kilobytes. If
/L:size size is not specified, displays current size.

Forces the volume to dismount first if necessary. All opened handles to the
/X volume would then be invalid (implies /F).

/I NTFS only: Performs a less vigorous check of index entries.

/C NTFS only: Skips checking of cycles within the folder structure.

The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain
checks of the volume.
Microsoft Windows 2000 and Windows XP users who have NTFS should also consider using
the CHKNTFS command.
Windows 2000 and Windows XP recovery console chkdsk syntax
Note: The below options are only available in the recovery console.
Checks a disk and displays a status report.
chkdsk [drive:] [/p] | [/r]

[drive:] Specifies the drive to check.

/p Check even if the drive is not flagged dirty, bad.

/r Locates bad sectors and recovers readable information (implies /p).

Chkdsk may be used without any parameters, in which case the current drive is checked with no
switches. You can specify the listed switches.
Chkdsk requires the Autochk.exe file. Chkdsk automatically locates Autochk.exe in the startup
(boot) directory. If it cannot be found in the startup directory, chkdsk attempts to locate the
Windows 2000 Setup CD. If the installation CD cannot be found, chkdsk prompts for the location
of Autochk.exe.
Examples
chkdsk
Will display all information described above and also report any crossed linked files.
chkdsk /f
Will fix any crossed linked files; however, do not run this command while you are
in Windows95 or Windows 3.x
About chkntfs
The chkntfs command is used to display or modify the checking of the disk drive using NTFS at
boot time.
Availability
The chkntfs.exe command is an external command and is available in the below Microsoft
operating systems.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or modifies the checking of disk at boot time.
CHKNTFS volume [...]
CHKNTFS /D
CHKNTFS /T[:time]
CHKNTFS /X volume [...]
CHKNTFS /C volume [...]
volume Specifies the drive letter (followed by a colon), mount point, or volume name.

/D Restores the machine to the default behavior; all drives are checked at boot
time and chkdsk is run on those that are dirty.

/T:time Changes the AUTOCHK initiation count down time to the specified amount of
time in seconds. If time is not specified, displays the current setting.

/X Excludes a drive from the default boot-time check. Excluded drives are not
accumulated between command invocations.

/C Schedules a drive to be checked at boot time; chkdsk will run if the drive is
dirty.
If no switches are specified, CHKNTFS will display if the specified drive is dirty or scheduled to be
checked on next reboot.
Examples
chkntfs /d
Restores the computer back to the default settings and all drives are checked at boot if they are
dirty.
NTFS
Short for New Technology File System, NTFS is a file organizational system that stores and
accesses information located on Microsoft Windows NT, Windows 2000, Windows XP operating
system. NTFS offers better methods of data protection and file recovery than previous versions
of FAT.
About choice
Allows for batch files and scripts to wait for the user to choose a set of choices.
Microsoft Windows 2000 and Windows XP users who have batch files that utilize the choice
command should modify the batch file to use the MS-DOS set command.
Availability
The choice command is an external command and is available in
MS-DOS 6.0+
Windows 95
Windows 98
Windows Vista
Windows 7
Syntax
choice [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]

Options:

/C[:]choices Specifies allowable keys. Def

/N Do not display choices and ?

/S Treat choice keys as case sen

/T[:]c,nn Default choice to c after nn s

text Prompt string to display

About cipher
Displays or alters the encryption of directories [files] on NTFS partitions.
 See the cipher dictionary definition for additional information about this term.
Availability
The cipher.exe command is an external command that is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or alters the encryption of directories [files] on NTFS partitions.
CIPHER [/E | /D] [/S:dir] [/A] [/I] [/F] [/Q] [/H] [/K] [pathname [...]]
CIPHER /W:directory
CIPHER /X[:efsfile] [filename]
/E Encrypts the specified directories. Directories will be marked so
that files added afterward will be encrypted.

/D Decrypts the specified directories. Directories will be marked so


that files added afterward will not be encrypted.

/S Performs the specified operation on directories in the given


directory and all subdirectories.

/A Operation for files as well as directories. The encrypted file could


become decrypted when it is modified if the parent directory is
not encrypted. It is recommended that you encrypt the file and
the parent directory.

/I Continues performing the specified operation even after errors


have occurred. By default, CIPHER stops when an error is
encountered.

/F Forces the encryption operation on all specified objects, even


those that are already encrypted. Already-encrypted objects are
skipped by default.

/Q Reports only the most essential information.

/H Displays files with the hidden or system attributes. These files are
omitted by default.
/K Create new file encryption key for the user running CIPHER. If this
option is chosen, all the other options will be ignored.

/W Removes data from available unused disk space on the entire


volume. If this option is chosen, all other options are ignored.
The directory specified can be anywhere in a local volume. If it
is a mount point or points to a directory in another volume, the
data on that volume will be removed.

/X Backup EFS certificate and keys into file filename. If efsfile is


provided, the current user's certificate(s) used to encrypt the file
will be backed up. Otherwise, the user's current EFS certificate
and keys will be backed up.

dir A directory path.

pathname Specifies a pattern, file or directory.

efsfile An encrypted file path.

Used without parameters, CIPHER displays the encryption state of the current directory and any
files it contains. You may use multiple directory names and wildcards. You must put spaces
between multiple parameters.
Examples
Display the status of each of the files in the current directory.
cipher
For example, running the above command may display something similar to the below example.
C:\DOCUME~1\ADMINI~1\Desktop>cipher

Listing C:\DOCUME~1\ADMINI~1\Desktop\
New files added to this directory will not be encrypted.

U 308374_harddisk_3.jpg
U cipher.txt
U FileZilla.lnk
U hope.txt
U inc
U l-gloss.pdf
U logos.gif
U Main_Page.htm
U Main_Page_files
U maxivistademo.zip
U move
Next, if we wanted to enable encryption on a directory, type a command similar to the below
command. In the below example this is encrypting the hope directory and will encrypt any files
added into that directory after the encryption has been enabled.
cipher /e hope
Encrypting directories in C:\DOCUME~1\ADMINI~1\Desktop\
test [OK]
1 directorie(s) within 1 directorie(s) were encrypted.
Cipher
1. Algorithm of encoding or encrypting data. Text that is ciphered is text that cannot be read
unless a special password or key is put in to decode it.
2. Windows command line command. See cipher command page for additional details and
examples
About cls

Cls is a command that allows a user to clear the complete contents of the screen and leave only
a prompt.

Availability

The cls command is an internal command and is available in the below Microsoft operating
systems.

All Versions of MS-DOS


Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7

Syntax

CLS

Examples

cls
Running the cls command at the command prompt would clear your screen of all previous text
and only return the prompt.
About command
The command.com is the command interpreter for MS-DOS and is required for the majority of
Microsoft's operating systems. Without command.com the computer running a Microsoft
operating system would be unable to boot.
When running Windows NT, 2000, XP, or future operating systems there are two versions of the
command interpreter, command.com and cmd.exe. Cmd offers additional environment
variables than command.com; however, it is recommend if you are attempting to run a MS-DOS
utility that you utilize the command.com. To use command.com, click Start / Run and type
command.
 Information about creating a bootable diskette, which also requires command.com, can be
found on our boot diskette page.
 Additional information about shells can be found on our shell dictionary definition.
 Additional information about COMMAND vs. CMD can be found on document CH000395.
Availability
Command, or command.com, is the command interpreter, and with early versions of Windows
and MS-DOS, you would not be able to use the computer without this file. This file is available
on all versions of Microsoft Windows and later versions of Windows use it to access the MS-
DOS shell.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
CMD, or CMD.EXE, is the command line shell introduced in Windows NT and available in all the
below versions of Microsoft Windows.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Command syntax
Starts a new copy of the Windows Command Interpreter.
COMMAND [[drive:] path] [device] [/E:nnnnn] [/L:nnnn] [/U:nnn] [/P] [/MSG] [/LOW] [/Y [/C|K]
command]
[drive:]path Specifies the directory containing COMMAND.COM.

device Specifies the device to use for command input and output.

Sets the initial environment size to nnnnn bytes. (nnnnn should be


/E:nnnnn between 256 and 32,768).

Specifies internal buffers length (requires /P as well). (nnnn should be


/L:nnnn between 128 and 1,024).

Specifies the input buffer length (requires /P as well). (nnn should be


/U:nnn between 128 and 255).

/P Makes the new Command Interpreter permanent (can't exit).

/MSG Stores all error messages in memory (requires /P as well).

/LOW Forces COMMAND to keep its resident data in low memory.

Steps through the batch program specified by /C or /K. (Only available in


/Y MS-DOS 6.x and above).

/C Executes the specified command and returns.


command

/K command Executes the specified command and continues running.

Display the errorlevel of every command executed (Only available in MS-


/Z DOS 7.x and above).

CMD syntax
Starts a new instance of the Windows 2000 / Windows XP command interpreter.
CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string]
/C Carries out the command specified by string and then terminates

/K Carries out the command specified by string but remains

/S Modifies the treatment of string after /C or /K (see below)


/Q Turns echo off

/D Disable execution of AutoRun commands from registry (see below)

/A Causes the output of internal commands to a pipe or file to be ANSI

/U Causes the output of internal commands to a pipe or file to be Unicode

/T:fg Sets the foreground/background colors (see COLOR /? for more info)

/E:ON Enable command extensions (see below)

/E:OFF Disable command extensions (see below)

/F:ON Enable file and directory name completion characters (see below)

/F:OFF Disable file and directory name completion characters (see below)

/V:ON Enable delayed environment variable expansion using c as the delimiter. For
example, /V:ON would allow !var! to expand the variable var at execution time.
The var syntax expands variables at input time, which is quite a different thing
when inside of a FOR loop.

/V:OFF Disable delayed environment expansion.

Note that multiple commands separated by the command separator '&&' are accepted for string
if surrounded by quotes. Also, for compatibility reasons, /X is the same as /E:ON, /Y is the same
as /E:OFF and /R is the same as /C. Any other switches are ignored.
If /C or /K is specified, then the remainder of the command line after the switch is processed as
a command line, where the following logic is used to process quote (") characters:
1. If all of the following conditions are met, then quote characters on the command line are
preserved:
- no /S switch
- exactly two quote characters
- no special characters between the two quote characters, where special is one of: &<>()@^|
- there are one or more whitespace characters between the the two quote characters
- the string between the two quote characters is the name of an executable file.
2. Otherwise, old behavior is to see if the first character is a quote character and if so, strip the
leading character and remove the last quote character on the command line, preserving any text
after the last quote character.
If /D was NOT specified on the command line, then when CMD.EXE starts, it looks for the
following REG_SZ/REG_EXPAND_SZ registry variables, and if either or both are present, they are
executed first.
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
Command Extensions are enabled by default. You may also disable extensions for a particular
invocation by using the /E:OFF switch. You can enable or disable extensions for all invocations of
CMD.EXE on a machine or user logon session by setting either or both of the following
REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The
command line switches take precedence over the registry settings.
The command extensions involve changes or additions to the below commands.
DEL or ERASE
COLOR
CD or CHDIR
MD or MKDIR
PROMPT
PUSHD
POPD
SET
SETLOCAL
ENDLOCAL
IF
FOR
CALL
SHIFT
GOTO
START (also includes changes to external command invocation)
ASSOC
FTYPE
To get specific details, type commandname /? to view the specifics.
Delayed environment variable expansion is NOT enabled by default. You can enable or disable
delayed environment variable expansion for a particular invocation of CMD.EXE with the /V:ON
or /V:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a
machine or user logon session by setting either or both of the following REG_DWORD values in
the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The
command line switches take precedence over the registry settings.
If delayed environment variable expansion is enabled, then the exclamation character can be
used to substitute the value of an environment variable at execution time.
File and Directory name completion is NOT enabled by default. You can enable or disable file
name completion for a particular invocation of CMD.EXE with the /F:ON or /F:OFF switch. You
can enable or disable completion for all invocations of CMD.EXE on a machine or user logon
session by setting either or both of the following REG_DWORD values in the registry using
REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar
with the hex value of a control character to use for a particular function (e.g. 0x4 is Ctrl-D and
0x6 is Ctrl-F). The user specific settings take precedence over the machine settings. The
command line switches take precedence over the registry settings.
If completion is enabled with the /F:ON switch, the two control characters used are Ctrl-D for
directory name completion and Ctrl-F for file name completion. To disable a particular
completion character in the registry, use the value for space (0x20) as it is not a valid control
character.
Completion is invoked when you type either of the two control characters. The completion
function takes the path string to the left of the cursor appends a wild card character to it if none
is already present and builds up a list of paths that match. It then displays the first matching
path. If no paths match, it just beeps and leaves the display alone. Thereafter, repeated pressing
of the same control character will cycle through the list of matching paths. Pressing the Shift key
with the control character will move through the list backwards. If you edit the line in any way
and press the control character again, the saved list of matching paths is discarded and a new
one generated. The same occurs if you switch between file and directory name completion. The
only difference between the two control characters is the file completion character matches
both file and directory names, while the directory completion character only matches directory
names. If file completion is used on any of the built in directory commands (CD, MD or RD) then
directory completion is assumed.
The completion code deals correctly with file names that contain spaces or other special
characters by placing quotes around the matching path. Also, if you backup, then invoke
completion from within a line, the text to the right of the cursor at the point completion was
invoked is discarded.
Examples
cmd
Opens the cmd command shell.
About color
The color command enables users running Microsoft Windows 2000 and Windows XP to quickly
and easily change the default color of their background or text in their MS-DOS window.
Availability
The color command is an internal command and is available in the below Microsoft operating
systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Sets the default console foreground and background colors.
COLOR [attr]
attr Specifies color attribute of console output
Color attributes are specified by TWO hex digits -- the first corresponds to the background; the
second the foreground. Each digit can be any of the below values.

0 = Black 8 = Gray

1 = Blue 9 = Light Blue

2 = Green A = Light Green

3 = Aqua B = Light Aqua

4 = Red C = Light Red

5 = Purple D = Light Purple

6 = Yellow E = Light Yellow

7 = White F = Bright White

If no argument is given, this command restores the color to what it was when CMD.EXE started.
This value either comes from the current console window, the /T command line switch or from
the DefaultColor registry value.
The COLOR command sets ERRORLEVEL to 1 if an attempt is made to execute the COLOR
command with a foreground and background color that are the same.
Examples
Color 0A
Creates a Black background with light bright green text, similar to many of the FTP, telnet, and
old BBS console screens.
About command
The command.com is the command interpreter for MS-DOS and is required for the majority of
Microsoft's operating systems. Without command.com the computer running a Microsoft
operating system would be unable to boot.
When running Windows NT, 2000, XP, or future operating systems there are two versions of the
command interpreter, command.com and cmd.exe. Cmd offers additional environment
variables than command.com; however, it is recommend if you are attempting to run a MS-DOS
utility that you utilize the command.com. To use command.com, click Start / Run and type
command.
 Information about creating a bootable diskette, which also requires command.com, can be
found on our boot diskette page.
 Additional information about shells can be found on our shell dictionary definition.
 Additional information about COMMAND vs. CMD can be found on document CH000395.
Availability
Command, or command.com, is the command interpreter, and with early versions of Windows
and MS-DOS, you would not be able to use the computer without this file. This file is available
on all versions of Microsoft Windows and later versions of Windows use it to access the MS-
DOS shell.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
CMD, or CMD.EXE, is the command line shell introduced in Windows NT and available in all the
below versions of Microsoft Windows.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Command syntax
Starts a new copy of the Windows Command Interpreter.
COMMAND [[drive:] path] [device] [/E:nnnnn] [/L:nnnn] [/U:nnn] [/P] [/MSG] [/LOW] [/Y [/C|K]
command]

[drive:]path Specifies the directory containing COMMAND.COM.


device Specifies the device to use for command input and output.

Sets the initial environment size to nnnnn bytes. (nnnnn should be


/E:nnnnn between 256 and 32,768).

Specifies internal buffers length (requires /P as well). (nnnn should be


/L:nnnn between 128 and 1,024).

Specifies the input buffer length (requires /P as well). (nnn should be


/U:nnn between 128 and 255).

/P Makes the new Command Interpreter permanent (can't exit).

/MSG Stores all error messages in memory (requires /P as well).

/LOW Forces COMMAND to keep its resident data in low memory.

Steps through the batch program specified by /C or /K. (Only available in


/Y MS-DOS 6.x and above).

/C Executes the specified command and returns.


command

/K command Executes the specified command and continues running.

Display the errorlevel of every command executed (Only available in MS-


/Z DOS 7.x and above).

CMD syntax
Starts a new instance of the Windows 2000 / Windows XP command interpreter.
CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string]
/C Carries out the command specified by string and then terminates

/K Carries out the command specified by string but remains

/S Modifies the treatment of string after /C or /K (see below)

/Q Turns echo off


/D Disable execution of AutoRun commands from registry (see below)

/A Causes the output of internal commands to a pipe or file to be ANSI

/U Causes the output of internal commands to a pipe or file to be Unicode

/T:fg Sets the foreground/background colors (see COLOR /? for more info)

/E:ON Enable command extensions (see below)

/E:OFF Disable command extensions (see below)

/F:ON Enable file and directory name completion characters (see below)

/F:OFF Disable file and directory name completion characters (see below)

/V:ON Enable delayed environment variable expansion using c as the delimiter. For
example, /V:ON would allow !var! to expand the variable var at execution time.
The var syntax expands variables at input time, which is quite a different thing
when inside of a FOR loop.

/V:OFF Disable delayed environment expansion.

Note that multiple commands separated by the command separator '&&' are accepted for string
if surrounded by quotes. Also, for compatibility reasons, /X is the same as /E:ON, /Y is the same
as /E:OFF and /R is the same as /C. Any other switches are ignored.
If /C or /K is specified, then the remainder of the command line after the switch is processed as
a command line, where the following logic is used to process quote (") characters:
1. If all of the following conditions are met, then quote characters on the command line are
preserved:
- no /S switch
- exactly two quote characters
- no special characters between the two quote characters, where special is one of: &<>()@^|
- there are one or more whitespace characters between the the two quote characters
- the string between the two quote characters is the name of an executable file.
2. Otherwise, old behavior is to see if the first character is a quote character and if so, strip the
leading character and remove the last quote character on the command line, preserving any text
after the last quote character.
If /D was NOT specified on the command line, then when CMD.EXE starts, it looks for the
following REG_SZ/REG_EXPAND_SZ registry variables, and if either or both are present, they are
executed first.
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
Command Extensions are enabled by default. You may also disable extensions for a particular
invocation by using the /E:OFF switch. You can enable or disable extensions for all invocations of
CMD.EXE on a machine or user logon session by setting either or both of the following
REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The
command line switches take precedence over the registry settings.
The command extensions involve changes or additions to the below commands.
DEL or ERASE
COLOR
CD or CHDIR
MD or MKDIR
PROMPT
PUSHD
POPD
SET
SETLOCAL
ENDLOCAL
IF
FOR
CALL
SHIFT
GOTO
START (also includes changes to external command invocation)
ASSOC
FTYPE
To get specific details, type commandname /? to view the specifics.
Delayed environment variable expansion is NOT enabled by default. You can enable or disable
delayed environment variable expansion for a particular invocation of CMD.EXE with the /V:ON
or /V:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a
machine or user logon session by setting either or both of the following REG_DWORD values in
the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The
command line switches take precedence over the registry settings.
If delayed environment variable expansion is enabled, then the exclamation character can be
used to substitute the value of an environment variable at execution time.
File and Directory name completion is NOT enabled by default. You can enable or disable file
name completion for a particular invocation of CMD.EXE with the /F:ON or /F:OFF switch. You
can enable or disable completion for all invocations of CMD.EXE on a machine or user logon
session by setting either or both of the following REG_DWORD values in the registry using
REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar
with the hex value of a control character to use for a particular function (e.g. 0x4 is Ctrl-D and
0x6 is Ctrl-F). The user specific settings take precedence over the machine settings. The
command line switches take precedence over the registry settings.
If completion is enabled with the /F:ON switch, the two control characters used are Ctrl-D for
directory name completion and Ctrl-F for file name completion. To disable a particular
completion character in the registry, use the value for space (0x20) as it is not a valid control
character.
Completion is invoked when you type either of the two control characters. The completion
function takes the path string to the left of the cursor appends a wild card character to it if none
is already present and builds up a list of paths that match. It then displays the first matching
path. If no paths match, it just beeps and leaves the display alone. Thereafter, repeated pressing
of the same control character will cycle through the list of matching paths. Pressing the Shift key
with the control character will move through the list backwards. If you edit the line in any way
and press the control character again, the saved list of matching paths is discarded and a new
one generated. The same occurs if you switch between file and directory name completion. The
only difference between the two control characters is the file completion character matches
both file and directory names, while the directory completion character only matches directory
names. If file completion is used on any of the built in directory commands (CD, MD or RD) then
directory completion is assumed.
The completion code deals correctly with file names that contain spaces or other special
characters by placing quotes around the matching path. Also, if you backup, then invoke
completion from within a line, the text to the right of the cursor at the point completion was
invoked is discarded.
Examples
cmd
Opens the cmd command shell.
About comp
A simple compare that compares two or more files.
Availability
The comp.exe command is an external command and is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Compares the contents of two files or sets of files.
COMP [data1] [data2] [/D] [/A] [/L] [/N=number] [/C]

data1 Specifies location and name(s) of first file(s) to compare.

data2 Specifies location and name(s) of second files to compare.

/D Displays differences in decimal format.

/A Displays differences in ASCII characters.

/L Displays line numbers for differences.

/N=number Compares only the first specified number of lines in each file.

/C Disregards case of ASCII letters when comparing files.

To compare sets of files, use wildcards in data1 and data2 parameters.


Examples
Note: Unless the /N option is used the comp command will only compare the size of the file.
comp file1.txt file2.txt /N=10 /A
Compares file1.txt with file2.txt. In this example we are using the /A option to display
the ASCII characters that the compare has found different. If the /A option is not displayed, the
comp command will display the differences in hexadecimal notation. Below is an example of
how the comp command may display the comparison in this example.
Compare error at LINE 5
file1 = i
file2 = o
Compare error at LINE 5
file1 = v
file2 = u
Compare error at LINE 5
file1 = e
file2 = r
Compare error at LINE 6
file1 = s
file2 = f
Compare error at LINE 6
file1 = x
file2 = v
Compare error at LINE 6
file1 =
file2 = e
Compare error at LINE 7
file1 =

file2 =
Compare error at LINE 7
file1 =
file2 =

Compare error at LINE 8


file1 =

file2 = s

File1 only has 7 lines


About compact
Compact is a MS-DOS command used to compress, uncompress, and view compressed files.
Availability
The compact.exe command is an external command and is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or alters the compression of files on NTFS partitions.
COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [filename [...]]
Compresses the specified files. Directories will be marked so that files added
/C afterward will be compressed.
Uncompresses the specified files. Directories will be marked so that files
/U added afterward will not be compressed.

Performs the specified operation on files in the given directory and all
/S subdirectories. Default "dir" is the current directory.

Displays files with the hidden or system attributes. These files are omitted by
/A default.

Continues performing the specified operation even after errors have


/I occurred. By default, COMPACT stops when an error is encountered.

Forces the compress operation on all specified files, even those that are
/F already compressed. Already-compressed files are skipped by default.

/Q Reports only the most essential information.

filename Specifies a pattern, file, or directory.

Used without parameters, COMPACT displays the compression state of the current directory
and any files it contains. You may use multiple filenames and wildcards. You must put spaces
between multiple parameters.
Examples
compact
Display all the files in the current directory and their compact status.
compact file.txt
Display the compact status of the file file.txt
compact file.txt /C
Compacts the file.txt file.

About control
Control enables Microsoft Windows users to open the Control Panel and items within
the Control Panel from the command prompt.
Availability
The control command is an external command and is available in the below Microsoft operating
systems.
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Note: Although this command is available in all versions of Microsoft Windows after the release
of Windows 95, not all versions support the same commands. See the chart in examples for
additional information.
Syntax
No syntax is available for the control command. For available commands see the below
examples of all the available commands control is capable of doing through the command and
run line.
Examples
Below is a chart of the available options the command is capable of doing. Each release of
Microsoft Windows supports different options for this command therefore we have also listed if
the command is or is not supported in each of theWindows operating systems.
95/98/ N 2000/ Information
Command
ME T XP

Control No N Yes Opens the Microsoft


admintools o Windows Administrative
Tools window.

Control Yes Y Yes Opens the Microsoft


desktop e Windows Display
s Properties window.

Control Yes Y Yes Opens the Microsoft


color e Windows Display
s Properties window with
the appearance tab open.

Control Yes Y Yes Opens the Microsoft


date/time e Windows Date/Time
s Properties window.

Control No N No/Ye Opens the Microsoft


folders o s Windows Folder Options.

Control Yes Y Yes Opens the Microsoft


fonts e Windows Fonts folder.
s

Control Yes Y Yes Opens the Microsoft


infrared e Windows Infrared folder
s if available.

Control Yes Y Yes Opens the Microsoft


internationa e Windows Regional
l s Options window.

Control Yes Y Yes Opens the Microsoft


keyboard e Windows Keyboard Prope
s rties window.

Control Yes Y Yes Opens the Microsoft


mouse e Windows Mouse Properti
s es window.

Control No N Yes Opens the Microsoft


netconnecti o Windows Network and
ons Dial-up Connections
window.

Control No N Yes Opens the Microsoft


netware o Windows Netware
window if installed and
available

Control No N Yes Opens the Microsoft


panel o Windows Control Panel.

Control Yes Y Yes Opens the Microsoft


printers e Windows Printers
s window.

Control No N Yes Opens the Microsoft


schedtasks o Windows Schedule tasks
window.

Control No N Yes Opens the Microsoft


telephony o Windows Location
information window.

Control No N Yes Opens the Microsoft


userpasswor o Windows Users and
ds Passwords window.

The control command is also capable of executing many of the .cpl files located on your
computer; for example, a user can type the below command to open the Time and Date
window. A listing of .cpl files and additional information about adding and removing icons in the
Control Panel can be found on document CH000136.
control TimeDate.cpl

About convert
Converts FAT volumes to NTFS.
Availability
The convert.exe command is an external command and is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Converts FAT volumes to NTFS.
CONVERT volume /FS:NTFS [/V]

volume Specifies the drive letter (followed by a colon), mount point, or volume name.

/FS:NTFS Specifies that the volume to be converted to NTFS.

/V Specifies that Convert should be run in verbose mode.

Examples
convert d: /fs:ntfs
Convert the d: drive, which in this example is a FAT volume, to a NTFS volume. Note, if this
volume is anything other than FAT, such as NTFS or RAW, this command will generate an error.
About copy
Allows the user to copy one or more files to an alternate location.
Availability
The copy command is an internal command and is available in the below Microsoft operating
systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Copies one or more files to another location.
COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination] [/A | /B]] [/V] [/Y | /-Y]

source Specifies the file or files to be copied.

/A Indicates an ASCII text file.

/B Indicates a binary file.

destination Specifies the directory or filename for the new file(s).

/V Verifies that new files are written correctly.

Suppresses prompting to confirm you want to overwrite an existing


/Y destination file.

Causes prompting to confirm you want to overwrite an existing destination


/-Y file.

The switch /Y may be preset in the COPYCMD environment variable. This may be overridden
with /-Y on the command line.
To append files, specify a single file for destination, but multiple files for source (using wildcards
or file1+file2+file3 format).
Examples
copy *.* a:
Copy all files in the current directory to the floppy disk drive.
copy autoexec.bat c:\windows
Copy the autoexec.bat, usually found at root, and copy it into the windows directory; the
autoexec.bat can be substituted for any file(s).
copy win.ini c:\windows /y
Copy the win.ini file in the current directory to the windows directory. Because this file already
exists in the windows directory it normally would prompt if you wish to overwrite the file.
However, with the /y switch you will not receive any prompt.
copy "computer hope.txt" hope
Copy the file "computer hope.txt" into the hope directory. Whenever dealing with a file or
directory with a space, it must be surrounded with quotes. Otherwise you'll get the "The syntax
of the command is incorrect." error.
copy myfile1.txt+myfile2.txt
Copy the contents in myfile2.txt and combines it with the contents in myfile1.txt.
copy con test.txt
Finally, a user can create a file using the copy con command as shown above, which creates the
test.txt file. Once the above command has been typed in, a user could type in whatever he or
she wishes. When you have completed creating the file, you can save and exit the file by
pressing CTRL+Z, which would create ^Z, and then press enter. An easier way to view and edit
files in MS-DOS would be to use the edit command.
About ctty
Ctty is a MS-DOS utility that allows you to change the standard computer input/output device.
Availability
The ctty command is an internal command and is available in
MS-DOS 5.0 and above
Windows 95
Windows 98
Windows NT
Syntax
Changes the terminal device used to control your system.
CTTY device
device The terminal device you want to use, such as COM1.

Available MS-DOS devices for CTTY:


AUX
COM1
COM2
COM3
COM4
CON
LPT1
LPT2
LPT3
NUL
Examples
ctty aux
Moves the input and output to a remote terminal connected to the auxiliary port.
ctty con
Moves the input and output back to the main terminal. This would be typed from a remote
terminal
Warning: Using CTTY NUL will disconnect the computer display and keyboard from the screen
and not allow you to reconnect the input and output from a remote terminal.

About date
The date command can be used to look at the current date of the computer as well as change
the date to an alternate date.
Availability
The date command is an internal command and is available in
MS-DOS 5.0 and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or sets the date.
DATE [date]
Type DATE without parameters to display the current date setting and
a prompt for a new one. Press ENTER to keep the same date.
Examples
date
Display the current date and prompt for a new one. If no date is entered, the current date will
be kept.
 Additional information about setting the computer date can also be found on document
CH000554.
How to set a computer's date and time.
Question
How to set a computer's date and time.
Answer
Below is a listing of different methods of how to change the computer's date and time in each of
the major operating systems and through the CMOS setup.
If the computer looses or resets the time and date after it has been off the CMOS battery is
bad and needs to be replaced.
Windows Vista and 7 users
Windows 9x, NT, 2000, and XP users
Through the BIOS / CMOS setup
MS-DOS and Windows command line users
Linux and Unix users
Apple users
Setting the date and time in Windows Vista and 7
1. Click on the Date and Time in the notification area. This is commonly the bottom right-hand
corner of the screen.
2. In the Window that appears click Change date and time settings
Setting the date and time in Microsoft Windows 95, 98, ME, NT 4.0, 2000, and XP
1. Right-click on the time in your Systray. This is commonly in the bottom right-hand of your
screen.
2. Click the Adjust Date/Time menu item.
3. This will open the Date/Time Properties window. In this window you can adjust the time, date,
and time zone. If you wish to change how the computer handles daylight savings, click the Time
Zone tab and check or uncheck the 'Automatically adjust clock for daylight saving changes'
option.
4. Once the proper date and time has been set, click Apply and then Ok.
You may also double-click the time to open the Date/Time Properties window.
 How to view the date in Windows after it has been set.
Setting the date and time in the BIOS / CMOS setup
1. Enter the CMOS setup.
2. In the main or system setup screen you should be able to see the date and time. Using
your arrow keys, navigate to the date and change the date. Once highlighted on the month, day,
or year, press your arrow keys or your page up / page down keys to change the date.

These steps may vary for your BIOS; additional help, information, and simulations can be found
on the BIOS help page. You can also change the date and time by following the steps for your
operating system below.
Setting the date and time in MS-DOS and Windows command line
Setting the date through MS-DOS can be done by using the date command. Additional
information and help with this command can be found on the date command page.
To adjust the time while in MS-DOS use the time command. Additional information about this
command can be found on the time command page.
Setting the date in Linux and Unix
Use the date command to set the date and time. See the date command page for further
information and examples of how to do this.
Setting the date on the Apple operating system
1. Open the Apple Menu
2. Open the Control Panels
3. Open Date & Time
4. Within the Date & Time window you will be able to set the date, time, time zone, and change
the network time server.

About debug
Debug is a method of looking at portions of your computer and writing assembly code to
perform certain tasks on your computer.
MS-DOS 2.x - 4.x uses debug.com
MS-DOS 5.x and above uses debug.exe
Availability
The debug command is an external command and is available in the below Microsoft operating
systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Syntax
DEBUG [[drive:][path]filename [testfile-parameters]]

[drive:][path]filename Specifies the file you want to test.

Specifies command-line information required by the file you


testfile-parameters want to test.

After Debug starts, type ? to display a list of debugging commands.


To get out of Debug you need to "Q" and enter
To execute the Debug routine you need to do "G" and enter
Examples
debug <press enter>
-D40:00 <type D40:00, and press enter>
Information about your computer ports would be displayed
-Q <type Q, and press enter>
Additional information about the above debug routine and other debug routines can be found
on our debug page.

About Defrag
Microsoft Defrag was first introduced with MS-DOS 6.0 and is a software utility capable of
organizing the files on the hard disk drive.
Availability
The scandisk command is an external command that is available in the below Microsoft
operating systems.
MS-DOS 6.0 and above
Users looking for steps on how to run Defrag in Windows and not from the command line
should see document CH001126.
Defrag syntax
Below is a listing of available switches in MS-DOS Defrag 6.0 and above. It is important to note
that these commands will not work in Windows 95 and above and defrag should never be ran
while Windows is running in the background.
defrag Drive: /F /U /S:order /B /Skiphigh /LCD /BW /G0 /A /H
Drive: Drive letter that you wish to defragment.

/F Insures that no empty space remains between files.

/U Leaves empty space if any is found between files.

/S:order Sorts files in specific sort <order>.


N = Alphabetic name order.
-N = Reverse alphabetic name order.
E = In alphabetic file extension order.
-E = Reverse alphabetic file extension order.
D = In date order (earliest to latest).
-D = Reverse date order (old to new).
S = By file size (small to large)
-S = By file size (large to small)

/B Reboot computer after completing defrag.

/Skiphigh Load defrag into conventional memory.

/LCD Start defrag in LCD color mode.

/BW Start defrag in black and white color mode.

/G0 Disable mouse and character set.

/A Start defrag in automatic mode.


/H Move hidden files.

Examples
defrag c:
Defrag the main hard disk drive and correct any fragmented files.
 See document CH000662 for other commonly asked questions about Microsoft Defrag.

How do I run Microsoft Defrag?

Question
How do I run Microsoft Defrag?
Answer
Do not run Defrag if you are using a SSD drive.
Windows XP, 2000, Vista, and 7 users
Windows 95/98 users
Windows NT users
Windows 3.x / MS-DOS users
Windows 2000, XP, Vista, and 7 Defrag
To run Defrag, we recommend you follow the below steps.
 Double-click My Computer or open Explorer.
 Highlight the local hard disk C: drive by clicking on it once.
 Right-click the highlighted local drive Click Properties
 Click the Tools tab and click the Defragment now button.
Windows 95, 98, and ME Defrag
Windows 95 improved the functionality of Defrag as did Windows 98. To run Defrag from
Windows, follow the below steps.
 Click Start
 Click Run and type Defrag in the run box
 Click ok
 Within the Defrag window, select the drive that you wish to be checked and click ok.
Windows NT Defrag
Windows NT is not shipped with Microsoft Defrag. However, various third-party companies offer
utilities that can Defrag and check your hard disk drive for you. Symantec a well respected
computer company, offers such a program.
Windows 3.x and MS-DOS Defrag
Defrag was first available in MS-DOS 6.0 and was available ever since. If you are running MS-DOS
6.0+ and would like to run Defrag, follow the below steps.
 If you are in Windows 3.x, click File and then Exit to get to the MS-DOS prompt.
 From MS-DOS type CD\DOS and press enter.
 From the C:\DOS> type Defrag and press enter, which should begin running Defrag on the
computer.
Finally, some computer manufacturers have changed the installation directory of where Defrag
is located if you are unable to run Defrag from DOS directory, go to the Windows directory by
typing CD\Windows. See the MS-DOS Defrag command page for additional information on this
command.

How do I run Microsoft Defrag?

Question
How do I run Microsoft Defrag?
Answer
Do not run Defrag if you are using a SSD drive.
Windows XP, 2000, Vista, and 7 users
Windows 95/98 users
Windows NT users
Windows 3.x / MS-DOS users
Windows 2000, XP, Vista, and 7 Defrag
To run Defrag, we recommend you follow the below steps.
 Double-click My Computer or open Explorer.
 Highlight the local hard disk C: drive by clicking on it once.
 Right-click the highlighted local drive Click Properties
 Click the Tools tab and click the Defragment now button.
Windows 95, 98, and ME Defrag
Windows 95 improved the functionality of Defrag as did Windows 98. To run Defrag from
Windows, follow the below steps.
 Click Start
 Click Run and type Defrag in the run box
 Click ok
 Within the Defrag window, select the drive that you wish to be checked and click ok.
Windows NT Defrag
Windows NT is not shipped with Microsoft Defrag. However, various third-party companies offer
utilities that can Defrag and check your hard disk drive for you. Symantec a well respected
computer company, offers such a program.
Windows 3.x and MS-DOS Defrag
Defrag was first available in MS-DOS 6.0 and was available ever since. If you are running MS-DOS
6.0+ and would like to run Defrag, follow the below steps.
 If you are in Windows 3.x, click File and then Exit to get to the MS-DOS prompt.
 From MS-DOS type CD\DOS and press enter.
 From the C:\DOS> type Defrag and press enter, which should begin running Defrag on the
computer.
Finally, some computer manufacturers have changed the installation directory of where Defrag
is located if you are unable to run Defrag from DOS directory, go to the Windows directory by
typing CD\Windows. See the MS-DOS Defrag command page for additional information on this
command.

Você também pode gostar