<s>
AUTOEXEC.BAT	O
is	O
a	O
system	O
file	O
that	O
was	O
originally	O
on	O
DOS-type	O
operating	O
systems	O
.	O
</s>
<s>
It	O
is	O
a	O
plain-text	O
batch	O
file	O
in	O
the	O
root	B-Application
directory	I-Application
of	O
the	O
boot	O
device	O
.	O
</s>
<s>
The	O
name	O
of	O
the	O
file	O
is	O
an	O
abbreviation	O
of	O
"	O
automatic	O
execution	O
"	O
,	O
which	O
describes	O
its	O
function	O
in	O
automatically	O
executing	O
commands	B-Application
on	O
system	O
startup	O
;	O
the	O
filename	O
was	O
coined	O
in	O
response	O
to	O
the	O
8.3	O
filename	O
limitations	O
of	O
the	O
FAT	B-Application
file	I-Application
system	I-Application
family	O
.	O
</s>
<s>
AUTOEXEC.BAT	O
is	O
read	O
upon	O
startup	O
by	O
all	O
versions	O
of	O
DOS	B-Device
,	O
including	O
MS-DOS	O
version	O
7.x	O
as	O
used	O
in	O
Windows	B-Application
95	I-Application
and	O
Windows	B-Device
98	I-Device
.	O
</s>
<s>
Windows	B-Device
ME	I-Device
only	O
parses	O
environment	O
variables	O
as	O
part	O
of	O
its	O
attempts	O
to	O
reduce	O
legacy	O
dependencies	O
,	O
but	O
this	O
can	O
be	O
worked	O
around	O
.	O
</s>
<s>
The	O
filename	O
was	O
also	O
used	O
by	O
(	O
DCP	O
)	O
,	O
an	O
MS-DOS	O
derivative	O
by	O
the	O
former	O
East-German	O
VEB	O
Robotron	O
.	O
</s>
<s>
In	O
Korean	O
versions	O
of	O
MS-DOS/PCDOS	O
4.01	O
and	O
higher	O
(	O
except	O
for	O
PCDOS	O
7	O
and	O
2000	O
)	O
,	O
if	O
the	O
current	O
country	O
code	O
is	O
set	O
to	O
82	O
(	O
for	O
Korea	O
)	O
and	O
no	O
/P:filename	O
is	O
given	O
and	O
no	O
default	O
AUTOEXEC.BAT	O
is	O
found	O
,	O
COMMAND.COM	B-Operating_System
will	O
look	O
for	O
a	O
file	O
named	O
KAUTOEXE.BAT	O
instead	O
in	O
order	O
to	O
ensure	O
that	O
the	O
DBCS	B-Application
frontend	O
drivers	O
will	O
be	O
loaded	O
even	O
without	O
properly	O
set	O
up	O
CONFIG.SYS	B-Device
and	O
AUTOEXEC.BAT	O
files	O
.	O
</s>
<s>
Under	O
DOS	B-Device
,	O
the	O
file	O
is	O
executed	O
by	O
the	O
primary	O
copy	O
of	O
the	O
command-line	O
processor	O
(	O
typically	O
COMMAND.COM	B-Operating_System
)	O
once	O
the	O
operating	O
system	O
has	O
booted	O
and	O
the	O
CONFIG.SYS	B-Device
file	O
processing	O
has	O
finished	O
.	O
</s>
<s>
While	O
DOS	B-Device
by	O
itself	O
provides	O
no	O
means	O
to	O
pass	O
batch	O
file	O
parameters	O
to	O
COMMAND.COM	B-Operating_System
for	O
AUTOEXEC.BAT	O
processing	O
,	O
the	O
alternative	O
command-line	O
processor	O
4DOS	B-Application
supports	O
a	O
4DOS.INI	B-Application
AutoExecParams	O
directive	O
and	O
//AutoExecParams	O
=	O
startup	O
option	O
to	O
define	O
such	O
parameters	O
.	O
</s>
<s>
Under	O
Concurrent	B-Operating_System
DOS	I-Operating_System
,	O
Multiuser	B-Operating_System
DOS	I-Operating_System
and	O
REAL/32	B-Operating_System
,	O
three	O
initial	O
parameters	O
will	O
be	O
passed	O
to	O
either	O
the	O
corresponding	O
STARTxxy.BAT	O
(	O
if	O
it	O
exists	O
)	O
or	O
the	O
generic	O
AUTOEXEC.BAT	O
startup	O
file	O
,	O
%1	O
holds	O
the	O
virtual	O
console	O
number	O
,	O
%2	O
the	O
2-digit	O
terminal	O
number	O
(	O
xx	O
)	O
(	O
with	O
00	O
being	O
the	O
main	O
console	O
)	O
and	O
%3	O
the	O
1-digit	O
session	O
number	O
(	O
y	O
)	O
.	O
</s>
<s>
Windows	B-Device
NT	I-Device
and	O
its	O
descendants	O
Windows	B-Application
XP	I-Application
and	O
Windows	B-Application
Vista	I-Application
parse	O
AUTOEXEC.BAT	O
when	O
a	O
user	O
logs	O
on	O
.	O
</s>
<s>
As	O
with	O
Windows	B-Device
ME	I-Device
,	O
anything	O
other	O
than	O
setting	O
environment	O
variables	O
is	O
ignored	O
.	O
</s>
<s>
Unlike	O
CONFIG.SYS	B-Device
,	O
the	O
commands	B-Application
in	O
AUTOEXEC.BAT	O
can	O
be	O
entered	O
at	O
the	O
interactive	O
command	O
line	O
interpreter	O
.	O
</s>
<s>
They	O
are	O
just	O
standard	O
commands	B-Application
that	O
the	O
computer	O
operator	O
wants	O
to	O
be	O
executed	O
automatically	O
whenever	O
the	O
computer	O
is	O
started	O
,	O
and	O
can	O
include	O
other	O
batch	O
files	O
.	O
</s>
<s>
In	O
early	O
versions	O
of	O
DOS	B-Device
,	O
AUTOEXEC.BAT	O
was	O
by	O
default	O
very	O
simple	O
.	O
</s>
<s>
The	O
DATE	O
and	O
TIME	B-Device
commands	B-Application
were	O
necessary	O
as	O
early	O
PC	B-Device
and	O
XT	B-Device
class	I-Device
machines	O
did	O
not	O
have	O
a	O
battery	O
backed-up	O
real-time	O
clock	O
as	O
default	O
.	O
</s>
<s>
The	O
following	O
is	O
a	O
basic	O
DOS	B-Device
5	O
type	O
AUTOEXEC.BAT	O
configuration	O
,	O
consisting	O
only	O
of	O
essential	O
commands	B-Application
:	O
</s>
<s>
This	O
configuration	O
sets	O
common	O
environment	O
variables	O
,	O
loads	O
a	O
disk	O
cache	O
,	O
places	O
common	O
directories	O
into	O
the	O
default	O
PATH	O
,	O
and	O
initializes	O
the	O
DOS	B-Device
mouse	O
/	O
keyboard	O
drivers	O
.	O
</s>
<s>
The	O
PROMPT	O
command	O
sets	O
the	O
prompt	O
to	O
"	O
C:\>	O
 "	O
(	O
when	O
the	O
working	B-Application
directory	I-Application
is	O
the	O
root	O
of	O
the	O
C	O
drive	O
)	O
instead	O
of	O
simply	O
"	O
C>	O
"	O
(	O
the	O
default	O
prompt	O
,	O
indicating	O
only	O
the	O
working	O
drive	O
and	O
not	O
the	O
directory	O
therein	O
)	O
.	O
</s>
<s>
In	O
general	O
,	O
device	O
drivers	O
were	O
loaded	O
in	O
CONFIG.SYS	B-Device
,	O
and	O
programs	O
were	O
loaded	O
in	O
the	O
AUTOEXEC.BAT	O
file	O
.	O
</s>
<s>
Some	O
devices	O
,	O
such	O
as	O
mice	O
,	O
could	O
be	O
loaded	O
either	O
as	O
a	O
device	O
driver	O
in	O
CONFIG.SYS	B-Device
,	O
or	O
as	O
a	O
TSR	O
in	O
AUTOEXEC.BAT	O
,	O
depending	O
upon	O
the	O
manufacturer	O
.	O
</s>
<s>
In	O
MS-DOS	O
6.0	O
and	O
higher	O
,	O
a	O
DOS	B-Device
boot	O
menu	O
is	O
configurable	O
.	O
</s>
<s>
This	O
can	O
be	O
of	O
great	O
help	O
to	O
users	O
who	O
wish	O
to	O
have	O
optimized	O
boot	O
configurations	O
for	O
various	O
programs	O
,	O
such	O
as	O
DOS	B-Device
games	O
and	O
Windows	O
.	O
</s>
<s>
The	O
GOTO	O
%CONFIG%	O
line	O
informs	O
DOS	B-Device
to	O
look	O
up	O
menu	O
entries	O
that	O
were	O
defined	O
within	O
CONFIG.SYS	B-Device
.	O
</s>
<s>
At	O
the	O
desired	O
end	O
of	O
each	O
specific	O
configuration	O
,	O
a	O
GOTO	O
command	O
redirects	O
DOS	B-Device
to	O
the	O
:END	O
section	O
.	O
</s>
<s>
When	O
installing	O
Windows	B-Application
95	I-Application
over	O
a	O
preexisting	O
DOS/Windows	O
install	O
,	O
CONFIG.SYS	B-Device
and	O
AUTOEXEC.BAT	O
are	O
renamed	O
to	O
CONFIG.DOS	B-Device
and	O
AUTOEXEC.DOS	O
.	O
</s>
<s>
This	O
is	O
intended	O
to	O
ease	O
dual	O
booting	O
between	O
Windows	O
9x	O
and	O
DOS	B-Device
.	O
</s>
<s>
When	O
booting	O
into	O
DOS	B-Device
,	O
they	O
are	O
temporarily	O
renamed	O
CONFIG.SYS	B-Device
and	O
AUTOEXEC.BAT	O
.	O
</s>
<s>
Windows	O
9x	O
also	O
installs	O
MSDOS.SYS	O
,	O
a	O
configuration	O
file	O
,	O
which	O
will	O
not	O
boot	O
Windows	O
95/98	O
if	O
parameterBOOTGUI	O
=	O
0	O
is	O
loaded	O
,	O
and	O
instead	O
a	O
DOS	B-Operating_System
prompt	I-Operating_System
will	O
appear	O
on	O
the	O
screen	O
(	O
Windows	O
can	O
still	O
be	O
loaded	O
by	O
calling	O
the	O
WIN	O
command	O
(	O
file	O
WIN.COM	O
)	O
.	O
</s>
<s>
This	O
"	O
BootGUI	O
"	O
option	O
must	O
be	O
set	O
to	O
"	O
0	O
"	O
in	O
order	O
to	O
boot	O
to	O
a	O
DOS	B-Operating_System
prompt	I-Operating_System
.	O
</s>
<s>
By	O
doing	O
this	O
,	O
the	O
system	O
's	O
operation	O
essentially	O
becomes	O
that	O
of	O
a	O
DOS/Windows	O
pairing	O
like	O
with	O
earlier	O
Windows	O
versions	O
.	O
</s>
<s>
Windows	O
can	O
be	O
started	O
as	O
desired	O
by	O
typing	O
WIN	O
at	O
the	O
DOS	B-Operating_System
prompt	I-Operating_System
.	O
</s>
<s>
When	O
installing	O
Caldera	O
DR-DOS	B-Application
7.02	O
and	O
higher	O
,	O
the	O
Windows	O
version	O
retains	O
the	O
name	O
AUTOEXEC.BAT	O
,	O
while	O
the	O
file	O
used	O
by	O
the	O
DR-DOS	B-Application
COMMAND.COM	B-Operating_System
is	O
named	O
AUTODOS7.BAT	B-Protocol
,	O
referred	O
to	O
by	O
the	O
startup	O
parameter	O
/P:filename.ext	O
in	O
the	O
SHELL	B-Device
directive	O
.	O
</s>
<s>
It	O
also	O
differentiates	O
the	O
CONFIG.SYS	B-Device
file	O
by	O
using	O
the	O
name	O
DCONFIG.SYS	B-Device
.	O
</s>
<s>
The	O
equivalent	O
to	O
AUTOEXEC.BAT	O
under	O
OS/2	B-Application
is	O
the	O
OS/2	B-Application
STARTUP.CMD	O
file	O
,	O
however	O
,	O
genuine	O
DOS	B-Device
sessions	O
booted	O
under	O
OS/2	B-Application
continue	O
to	O
use	O
AUTOEXEC.BAT	O
.	O
</s>
<s>
On	O
Windows	B-Device
NT	I-Device
and	O
its	O
derivatives	O
,	O
Windows	B-Application
2000	I-Application
,	O
Windows	B-Application
Server	I-Application
2003	I-Application
and	O
Windows	B-Application
XP	I-Application
,	O
the	O
equivalent	O
file	O
is	O
called	O
AUTOEXEC.NT	O
and	O
is	O
located	O
in	O
the	O
%SystemRoot%	O
\system32	O
directory	O
.	O
</s>
<s>
The	O
file	O
is	O
not	O
used	O
during	O
the	O
operating	O
system	O
boot	O
process	O
;	O
it	O
is	O
executed	O
when	O
the	O
MS-DOS	O
environment	O
is	O
started	O
,	O
which	O
occurs	O
when	O
a	O
DOS	B-Device
application	O
is	O
loaded	O
.	O
</s>
<s>
The	O
AUTOEXEC.BAT	O
file	O
may	O
often	O
be	O
found	O
on	O
Windows	B-Device
NT	I-Device
in	O
the	O
root	B-Application
directory	I-Application
of	O
the	O
boot	O
drive	O
.	O
</s>
<s>
Setting	O
environment	O
variables	O
through	O
this	O
file	O
may	O
be	O
interesting	O
if	O
for	O
example	O
MS-DOS	O
is	O
also	O
booted	O
from	O
this	O
drive	O
(	O
this	O
requires	O
that	O
the	O
drive	O
be	O
FAT-formatted	O
)	O
or	O
to	O
keep	O
the	O
variables	O
across	O
a	O
reinstall	O
.	O
</s>
<s>
The	O
Tweak	B-Application
UI	I-Application
applet	O
from	O
the	O
Microsoft	B-Application
PowerToys	I-Application
collection	O
allows	O
to	O
control	O
this	O
feature	O
(	O
Parse	O
AUTOEXEC.BAT	O
at	O
logon	O
)	O
.	O
</s>
