using ansi.sys in a *.bat file

Y

yawnmoth

Say I wanted to run a *.bat file that made use of ANSI codes. To do
this, ansi.sys would have to be included, which, as I understand it,
can only be included when a DOS or a Win16 program is ran. Isn't this
what distinguishes a *.cmd file from a *.bat file? I was under the
impression that *.cmd files ran as 32-bit programs and *.bat files ran
as 16-bit programs. If so, it seems like ansi.sys should indeed be
usable in a *.bat file.

Any ideas?
 
U

Uwe Sieber

yawnmoth said:
Say I wanted to run a *.bat file that made use of ANSI codes. To do
this, ansi.sys would have to be included, which, as I understand it,
can only be included when a DOS or a Win16 program is ran. Isn't this
what distinguishes a *.cmd file from a *.bat file? I was under the
impression that *.cmd files ran as 32-bit programs and *.bat files ran
as 16-bit programs. If so, it seems like ansi.sys should indeed be
usable in a *.bat file.

Any ideas?

Unter XP both, cmd and bat files are executed by CMD.EXE
by default. You can force a bat file beeing excuted in
the DOS box by
command /c batfile.bat

Put the ANSI.SYS in the CONFIG.NT file as known from the
old DOS days.


Uwe
 

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