ntvdmx64 icon indicating copy to clipboard operation
ntvdmx64 copied to clipboard

Loading ANSI drivers at system startup so they work in cmd prompt.

Open ghost opened this issue 2 years ago • 5 comments

Is there a scripted way to do this? Regkey?

ghost avatar Dec 28 '22 04:12 ghost

That's easy, just edit Windows\SysWOW64\config.nt and add:

device=%SystemRoot%\system32\ansi.sys

Then you can see ANSI-colors in DOS-programs. For example, you can download

https://www.robvanderwoude.com/files/ansidemo.zip

and then run it with

command /cansidemo.bat

And tadaa: image

leecher1337 avatar Dec 28 '22 09:12 leecher1337

By the way,

I try Ansi.com and AnsiDemo.exe ,it works.

I try Ansi.com and ansidemo.bat ,it failed ?

You can run GoTest.bat for testing.

peter8777555 avatar Jan 11 '23 15:01 peter8777555

That's easy, just edit Windows\SysWOW64\config.nt and add: device=%SystemRoot%\system32\ansi.sys

Try 1 : command /cansidemo.bat

It works.

Try 2 : command ansidemo.bat

It failed

peter8777555 avatar Jan 11 '23 19:01 peter8777555

That's how it is on Windows. If you think about it a little, you can guess why it behaves this way: command.com executes entered commands via Windows execute call. .bat files are normally handled by Windows NT cmd.exe, so no NTVDM involved when running .bat files, Therefore no ansi.sys in memory that can handle it, asno DOS involved. If you explicitly force it to execute in ntvdm with command /c, then it gets executed within NTVDM and it will show up fine.

leecher1337 avatar Jan 11 '23 23:01 leecher1337

Thank you for detail info.

peter8777555 avatar Jan 12 '23 09:01 peter8777555