Hi
Use the Windows Start then RUN and type in the "open" box CMD
Use the Windows Start then RUN and type in the "open" box COMMAND
You now have two DOS windows, "Old DOS" and "New DOS"
They look the same till you use them !!!
They both do exactly what you report - they do not recognise ansi
NOW TRY
ANSI.SYS /?
They both launch Notepad with a screen of garbage - you were not supposed to do that !!!
Ansi.sys is located somewhere on the Environmental variable PATH.
It should be found if it lives on the path, and if
a) The file extension is included, or
b) The extension is one of the defaults listed in PATHEXT
For me
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
You just said "if i type in ansi /? in cmd."
This suggests a second error, you used "cmd". I never knew till Dias pointed this out, but ANSI graphics etc do NOT work in a CMD (New DOS) shell, only in a COMMAND (Old DOS) Shell.
Finally, again as Dias has just explained, you need
1. Edit or create a config.nt file in "c:\windows\system32" folder.
2. Add the line: device=c:\windows\system32\ansi.sys
That will incorporate/install/whatever ansi.sys so that when a COMMAND shell delivers a character stream to the console, it will be intercepted/translated so that what eventually appears will include ansi graphic manipulations where required, and otherwise the words will look the same as normal. This only hapens with a COMMAND shell.
It is not available with CMD
you can have colours, or you can have delayedexpansion etc. etc., but not both.
Note, Ansi.sys is only invoked by the config.nt start up file.
The batch files never invoke ansi.sys - they only do whatever they do, and any console output may gain the benefit of Ansi.sys when it is running, but I doubt that the batch command has any way of telling whether or not it ANSI.sys is actually doing anything.
If the batch file should invoke ansi.sys it wont do any good - don't know if it does any harm.
Similarly batch can only abuse device=c:\windows\system32\ansi.sys
i.e. I will not try that - I know it wont help, and I fear it could harm - e.g. will it attempt to install (or whatever it is called) a driver at the wrong time and in the wrong place, and might this damage the existing drivers so that interrupts are no longer serviced and files are no longer written ?
I don't know what will go wrong. I only know that "Dragons Be Here"
Regards
Alan