MSDOS subsystem and Autoexec.nt / Config.nt

1 January 2001 by Snakefoot | Comment » | Trackback Off
CONFIG.SYS and AUTOEXEC.BAT are files essential to DOS. They also exist in Windows NT but they are called CONFIG.NT and AUTOEXEC.NT and reside in C:\WINNT\SYSTEM32.

They are executed every time a DOS subsystem is created within NTVDM.EXE, which means every time you start a 16-bit program (Like Command.com). They will configure the environment in which the program will be executed in. This includes WinNT DOS drivers like ANSI.SYS.

Note if the AUTOEXEC.NT has been damaged/lost (usually deleted by a virus, so remember to update virus scanner), then one can usually restore the AUTOEXEC.NT by copying it from \Windows\Repair to \Windows\System32. When running a DOS program without the AUTOEXEC.NT being in place it will give the following error message:

16 bit Windows Subsystem - C:\Windows\System32\AUTOEXEC.NT. The system file is not suitable for running MS-DOS and Microsoft Windows applications. Choose 'Close' to terminate the application.

More Info MS KB Q324767

Note it possible for Windows NT4/2000 to parse the AUTOEXEC.BAT (Placed in the root of the system-drive) during user logon, and append the PATH environment variable to the user PATH. The parsing of the AUTOEXEC.BAT is controlled by this STRING registry value:

[HKEY_CURRENT_USER \Software \Microsoft \Windows NT \CurrentVersion \Winlogon]
ParseAutoexec = "0" (Default = "1", Ignore = "0")

More Info MS KB Q124551

More Info MS KB Q101875
More Info MS KB Q103656
More Info MS KB Q129128
More Info MS KB Q165214
More Info MS KB Q220155
More Info MS KB Q301911
More Info MS KB Q314106
More Info MS KB Q314495

Related Lock MSDOS subsystem to a single core to avoid crashes
Related Disable the MSDOS and Win16 subsystem

Updated: 21 January 2010

Comments:

Comment by anonymous - 10 January 2009 @ 19:16 Reply

I’m trying to use some aliases for MS-DOS commands in Vista.
I’ve edited C:\Windows\system32\config.nt adding this line: “doskey finder=findstr /I /M /R $*”.
It doesn’t work: a new command prompt still says “finder” is unknown command. Why this? Where is my error?

PS
Even after a logoff-logon or reboot it’s still the same.

Comment by Snakefoot - 11 January 2009 @ 14:33 Reply

I didn’t know people was still messing about in the MS DOS command prompt (command.com) and wasn’t using the much better standard command prompt (cmd.exe).

I have little experience with doskey, but it seems you could get the same thing to succeed by creating a batch-file called finder.

Leave a comment


NB! Use the Forum for computer help and off-topic questions.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>