JSI Tip 6041. How do I troubleshoot MS-DOS programs running on Windows XP?
December 4, 2002
When you have problems with MS-DOS programs:
Test the NTVDM (Windows Virtual DOS Machine) subsystem:
1. Start / Run / Command.com / OK.
2. If a C:WindowsSystem32Command.com session does NOT open, the NTVDM ismisconfigured. Check the Config.nt and Autoexec.nt files in the %SystemRoot%System32 folder for non-standard entries:
Config.nt---------REM Windows MS-DOS Startup FileREMREM CONFIG.SYS vs CONFIG.NTREM CONFIG.SYS is not used to initialize the MS-DOS environment.REM CONFIG.NT is used to initialize the MS-DOS environment unless aREM different startup file is specified in an application's PIF.REMREM ECHOCONFIGREM By default, no information is displayed when the MS-DOS environmentREM is initialized. To display CONFIG.NT/AUTOEXEC.NT information, addREM the command echoconfig to CONFIG.NT or other startup file.REMREM NTCMDPROMPTREM When you return to the command prompt from a TSR or while running anREM MS-DOS-based application, Windows runs COMMAND.COM. This allows theREM TSR to remain active. To run CMD.EXE, the Windows command prompt,REM rather than COMMAND.COM, add the command ntcmdprompt to CONFIG.NT orREM other startup file.REMREM DOSONLYREM By default, you can start any type of application when runningREM COMMAND.COM. If you start an application other than an MS-DOS-basedREM application, any running TSR may be disrupted. To ensure that onlyREM MS-DOS-based applications can be started, add the command dosonly toREM CONFIG.NT or other startup file.REMREM EMMREM You can use EMM command line to configure EMM(Expanded Memory Manager).REM The syntax is:REMREM EMM = [A=AltRegSets] [B=BaseSegment] [RAM]REMREM AltRegSetsREM specifies the total Alternative Mapping Register Sets youREM want the system to support. 1 <= AltRegSets <= 255. TheREM default value is 8.REM BaseSegmentREM specifies the starting segment address in the Dos conventionalREM memory you want the system to allocate for EMM page frames.REM The value must be given in Hexdecimal.REM 0x1000 <= BaseSegment <= 0x4000. The value is rounded down toREM 16KB boundary. The default value is 0x4000REM RAMREM specifies that the system should only allocate 64Kb addressREM space from the Upper Memory Block(UMB) area for EMM page framesREM and leave the rests(if available) to be used by DOS to supportREM loadhigh and devicehigh commands. The system, by default, wouldREM allocate all possible and available UMB for page frames.REMREM The EMM size is determined by pif file(either the one associatedREM with your application or _default.pif). If the size from PIF fileREM is zero, EMM will be disabled and the EMM line will be ignored.REMdos=high, umbdevice=%SystemRoot%system32himem.sysfiles=40Autoexec.nt-----------@echo offREM AUTOEXEC.BAT is not used to initialize the MS-DOS environment.REM AUTOEXEC.NT is used to initialize the MS-DOS environment unless aREM different startup file is specified in an application's PIF.REM Install CD ROM extensionslh %SystemRoot%system32mscdexnt.exeREM Install network redirector (load before dosx.exe)lh %SystemRoot%system32redirREM Install DPMI supportlh %SystemRoot%system32dosxREM The following line enables Sound Blaster 2.0 support on NTVDM.REM The command for setting the BLASTER environment is as follows:REM SET BLASTER=A220 I5 D1 P330REM where:REM A specifies the sound blaster's base I/O portREM I specifies the interrupt request lineREM D specifies the 8-bit DMA channelREM P specifies the MPU-401 base I/O portREM T specifies the type of sound blaster cardREM 1 - Sound Blaster 1.5REM 2 - Sound Blaster Pro IREM 3 - Sound Blaster 2.0REM 4 - Sound Blaster Pro IIREM 6 - SOund Blaster 16/AWE 32/32/64REMREM The default value is A220 I5 D1 T3 and P330. If any of the switches isREM left unspecified, the default value will be used. (NOTE, since all theREM ports are virtualized, the information provided here does not have toREM match the real hardware setting.) NTVDM supports Sound Blaster 2.0 only.REM The T switch must be set to 3, if specified.SET BLASTER=A220 I5 D1 P330 T3REM To disable the sound blaster 2.0 support on NTVDM, specify an invalidREM SB base I/O port address. For example:REM SET BLASTER=A0lh %SystemRoot%System32Nw16 (only if CSNW is installed)lh %SystemRoot%System32Vwipxspx (only if CSNW is installed)
NOTE: Use REM to ignore any otherentries for troubleshooting.
NOTE: You can copy these files from %SystemRoot%Repair or expand the autoexec.nt_ and Config.nt_ files from the I386 folder of the Windows XP CD-ROM.
3.Press CTRL+SHIFT+ESC to start Task Manager and close all running programs.
4. Make sure that no other instance of NTVDM is running.
5. Use MSConfig to temporarily disable all programs in the Startup groups, the registry Run and RunOnce keys, and the "run=" and "load=" lines in the Win.ini file.
6. Make sure that the following files exist in the %SystemRoot%System32 folder, that they have dates consistent with the initial install or your last service pack (Expand from the media):
command.com Ntio.sys Ntdos.sys Ntvdm.exe Ntvdmd.dll Redir.exe
Any environment variables required must be located in the registry at HKEY_LOCAL_MACHINESystemCurrentControlSetControlSession ManagerEnvironment.
Any device drivers used in the NTVDM session should have been installed by Windows and recorded at:
HKEY_LOCAL_MACHINESystemCurrentControlSetControlVirtualDeviceDriversVDD.
MS-DOS Program-Specific Issues
01. All MS-DOS program functions except task-switching functions are supported.
02. The MS-DOS program may not use block mode drivers, APIs that deal with block devices, and SETDPB.
03. Interrupt 10 function 1A returns 0; all other functions are passed to read-only memory (ROM).
04. Interrupt 13 calls that deal with prohibited disk access are not supported.
05. Interrupt 18 (ROM BASIC) generates a message that says that ROM BASIC is not supported.
06. Interrupt 19 does not restart the computer, but cleanly closes the current NTVDM.
07. Interrupt 2F, which deals with the DOSKEY program callouts (AX = 4800), is not supported.
08. Microsoft CD-ROM Extensions (MSCDEX) functions 2, 3, 4, 5, 8, E, and F are not supported.
09. Programs that require unrestricted access to hardware are not supported.
10. If the program uses custom versions of Autoexec.nt and Config.nt, these should NOT be stored in the %SystemRoot%System32 folder. These are referenced by using the Advanced button on the Program tab of the shortcut, program, or .pif Properties.
11. Make sure that all the tabs in the Properties dialog are properly set per the author's specifications.
Other references:
NTVDM Error: There Is No Disk in the Drive.
Entries in CONFIG.NT or AUTOEXEC.NT May Cause NTVDM Errors.
Err: 'Hidden Console of WOW VDM' Running 16-bit or DOS App.
About the Author
You May Also Like