Dos windows & autoexec.bat

A

Agent Smith

When I open a DOS window under XP Pro, does the machine still automatically
run the autoexec.bat file, and if not, is there any way to perform the
functions of that file, when a DOS window is opened? TIA.
 
P

Pegasus \(MVP\)

Agent Smith said:
When I open a DOS window under XP Pro, does the machine still
automatically
run the autoexec.bat file, and if not, is there any way to perform the
functions of that file, when a DOS window is opened? TIA.

"DOS" is a legacy operating system introduced some
thirty years ago. It is rarely used these days and it does
not exist under WinXP, even though the black screen
may resemble it. You're probably referring to the "Command
Prompt". If you want to execute your own commands
when opening a Command Prompt then you could
create a shortcut with this line in the "Target" field:

cmd.exe /k c:\Tools\AgentSmith.bat

and place whatever you wish into c:\Tools\AgentSmith.bat.
 
C

Colin Barnhorst

XP uses a command line interpreter that can interpret most MSDOS commands
but there is no MSDOS in XP. Specifically there is no command.com or
msdos.sys.
 
P

philo

Agent Smith said:
When I open a DOS window under XP Pro, does the machine still
automatically
run the autoexec.bat file, and if not, is there any way to perform the
functions of that file, when a DOS window is opened? TIA.


In your system32 folder there is an autoexec.nt file that you may modify as
desired
 
P

Pegasus \(MVP\)

philo said:
In your system32 folder there is an autoexec.nt file that you may modify
as desired

The OP may well modify it as desired but AFAIR, the Command
Prompt takes no notice of this file.
 
P

philo

Pegasus (MVP) said:
The OP may well modify it as desired but AFAIR, the Command
Prompt takes no notice of this file.

I gave it a test and this is what happened:

though autoexec.nt was (as you stated) ignored upon running "cmd"

interestingly enough when running "command" at the cmd prompt did bring up
the modifications I made within autoexec.nt


Of course, one can always right click on the dos application in Windows
explorer and modify the properties
to get the desired customizations...as was done with the old msdos .pif
 
P

Pegasus \(MVP\)

philo said:
I gave it a test and this is what happened:

though autoexec.nt was (as you stated) ignored upon running "cmd"

interestingly enough when running "command" at the cmd prompt did bring up
the modifications I made within autoexec.nt

"command.com" is a legacy command processor and should
not be used unless circumstances dictate it. The native
command processor for WinXP is cmd.exe. There is
a perfectly good method to execute some command(s)
when launching it - see my first reply.
 
J

John John (MVP)

There is a Command.com in Windows XP, it is the command line interpreter
for the NT Virtual DOS Machine (NTVDM). The Config.nt and Autoexec.nt
files are processed when the NTVDM is started, launching Command.com
automatically starts the Virtual DOS Machine.

John
 
P

philo

Pegasus (MVP) said:
"command.com" is a legacy command processor and should
not be used unless circumstances dictate it. The native
command processor for WinXP is cmd.exe. There is
a perfectly good method to execute some command(s)
when launching it - see my first reply.

Yep...that was a good answer allright...
of course who know what DOS app the OP is using?
Though I generally run my dos apps using "cmd"

When they were originally written for msdos-x the command interpretor was
command.com


Command.com is still included with XP specifically for some of those old DOS
apps
 
A

Agent Smith

There is a Command.com in Windows XP, it is the command line
interpreter for the NT Virtual DOS Machine (NTVDM). The Config.nt and
Autoexec.nt files are processed when the NTVDM is started, launching
Command.com automatically starts the Virtual DOS Machine.

Can anybody recommend a good book for learning the advanced features of
XP Pro, like these?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top