Re: using ansi.sys in a *.bat file



yawnmoth wrote:
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

.



Relevant Pages

  • Re: How do I...
    ... I initiated the BAT file from the Registry without any ... trying to get the "DOS CMD.EXE" window to either run ... >> file that contained the command worked. ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: DOS window disappears
    ... That did the trick - and adding exit after the pause closes the window after pressing a key. ... If you want the window to remain open, type "cmd" into run to first open the DOS window. ... If you want to use a BAT file or something like that, add a line for the "cmd" instruction. ... :> for DOS Programs accessed by clicking an icon. ...
    (microsoft.public.windowsxp.help_and_support)
  • RE: Determining When a DOS Command is Finished In Access - BCP
    ... There is a better method that shelling out to a .bat file to do this. ... at the FileSearch object in Access. ... I think if you replace your DOS shell to ... > of the time but some times Access gets ahead of the DOS command. ...
    (microsoft.public.access.externaldata)
  • Re: Using shellexecute......
    ... I tried using a CMD window to test the command string, and it does work to an extent. ... The problem with the .bat file approach is I want the DOS argument to be a runtime variable. ... I guess I could copy the requested file to a temporary file, execute the DOS program and ...
    (microsoft.public.vb.general.discussion)
  • Re: Any recs for B/U s-ware??
    ... i use xxcopy from xxcopy.com ... its a dos based copy program that works amazingly fast. ... just create a .bat file and put the commands in it and you can schedule it to go off whenever you want and clone any part of your ahrd drive and it can just copy the files that changed. ...
    (alt.sys.pc-clone.dell)