using ansi.sys in a *.bat file

  • Thread starter Thread starter yawnmoth
  • Start date Start date
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?
 
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
 
Back
Top