Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SDETERS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get DOS based programs to run in Windows!!

Status
Not open for further replies.

warrenelec

Mechanical
Oct 31, 2003
37
Hi,

I am trying to run a DOS based program on Windows XP. When I try to open a window to run DOS, I get th following error message:

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.


Not sure if i deleted something i shoudn't have or what.
Any help on how to fix is greatly appreciated. Thanks

Warren
 
Replies continue below

Recommended for you

Are you running the DOS-based program from a command prompt or from Start/Run? Or by some other means? Tell us as much detail as you can about the DOS-based program (16-bit, or 32-bit DOS-extended executable) and how you launched it. Tell us also what is in your AUTOEXEC.NT file, in case there is something in that causing the problem before the program even gets launched. If you are running the program from an icon, right-click on the icon, select Properties, and tell us about how the icon is defined. Keep in mind that a DOS-extended application typically will not run under XP or under Win2000 with patch #835732 applied, but usually there is a message about stack fault protection rather than what you indicate.
 
Dick does that applies to XP - service pack 2 also? I have an application that runs under Win2000, Xp but not under XP with service pack 2. What is the work around?

Regards

Steven van Els
SAvanEls@cq-link.sr
 
I don't have easy access to XP at present (only Win2K, ME, 98/SE), so I can't give a definitive answer regarding XP/SP2. My own experiences regarding running DOS-extended executables under XP are limited to the Lahey F77L/EM-32 compiler and executables produced by it; the executables used the Phar-Lap DOS extender. I can't honestly say if the failure of XP to run such executables (also noted by others, as I have seen on the Lahey forum) is limited to just those using the Phar-Lap extender or this applies to all DOS extenders. I had no problem under Win2000Pro until I installed a bunch of "security" patches. Someone soon pointed out that it was #835732 that rendered Win2K also unable to run those executables. I uninstalled that particular patch and recovered the capability. Some other poster on the Lahey forum has suggested ways to change stack size on executables to get around the XP problem, but I am not sure if was intended for 16-bit executables or 32-bit ones. Oddly, when I did have access to an XP (Home) machine, it seemed to have no problem with 16-bit executables. Perhaps someone here or on a different forum has all the details on this issue. For now, I know of no workaround, other than to hang onto an old PC running something other than XP or fully patched 2K.
 
Thanks Dick, I think I will throw the question at Tek-Tips.

Steven van Els
SAvanEls@cq-link.sr
 
Thanks for the reply. It is 16-bit DOS subsystem. I open the programs from a desktop icon. I looked around to find the AUTOEXEC.NT file is not in the system32 folder. I have tried to coopy it from another computer, which got rid of the error message however the DOS program is not functioning properly. Would this be a setting in the autoexec file or is it possible I am missing other files? Also, the AUTOEXEC file is again missing (even though i copied it yesterday) after rebooting my computer this morning. Could this be a virus?

Thanks for the help!

Warren
 
Warrenelec:

Where did the desktop icon come from? I am guessing that you did an install of something you got somewhere, and either it was built earlier for a Windows NT or 2000 installation or you copied the program's files and .PIF file for the desktop icon from another PC, or something like that.

Now my inexperience with XP will show. AUTOEXEC.NT was a Windows NT equivalent of the old DOS AUTOEXEC.BAT, which set up a PC's running environment with custom settings, PATH, etc. Since Microsoft has been trying to wean us all away from DOS things (even though NT and 2K, with their CMD.EXE replacement for COMMAND.COM really did give "a better DOS than DOS"), it would not surprise me if with XP they either did away with AUTOEXEC.NT or created a new equivalent for XP. What you might try is building a new desktop icon for the program (rename the old one to preserve whatever might be in it, for reference). In the Windows Explorer, find the program you want to run, right-click on it, and build a shortcut to it. Move the shortcut to the desktop, if that is where you want it. You didn't say just *how* the DOS program was not running properly with the borrowed AUTOEXEC.NT. Perhaps the copy is not compatible with the version of XP you have. Did the error message in your first post result from a borrowed AUTOEXEC.NT? The missing file, after a reboot, could conceivably be XP's way of cleaning up (renaming, moving?) after detecting an incompatible AUTOEXEC.NT. Perhaps the one it prefers to use is a hidden file somewhere.

Another thing to try is just running a DOS command shell, changing directories to where you have the program, and executing it directly. If it fails that way, then perhaps there is indeed something specified in the older AUTOEXEC.NT file that sets up a PATH or some other environment variable needed by the app. Most folks don't go fiddling with AUTOEXEC.NT; I have, but I created a copy called AUTOEXEC.DOS modified that copy, and changed the .PIF file (via Properties/Program/Advanced for the icon - this was for Windows 2000). Do you have the thing running correctly on another (older) PC? Let us know how you make out.
 
I give up. I've had this message "vanish" three times while in the "preview" mode. I hope I have not inadvertantly submitted the same post three times. I'll just click "submit" this time and hope for the best. Sorry if this has caused any inconvenience.

I believe the key elements toward solving your DOS problem are going to be found in "config.nt" rather than autoexec.nt. Also, the command

"setver" may be needed. (C:\WINDOWS\SYSTEM32\setver.exe

I'll paste the highlights of the "setver" command first. All this is excerpted from the "help and support files" in XP.

Highlight 1.Examples
To run Myprog.exe, a file that runs with MS-DOS version 3.30, create an entry in the version table (explained below) that enables Myprog.exe to

interpret the MS-DOS subsystem as version 3.30 by typing:

setver myprog.exe 3.30

To delete the Myprog.exe entry from the version table, without otherwise affecting the Myprog.exe file, type:

setver myprog.exe /delete
(further details posted in full text after hightlight 2.)

Highlight 2
Windows XP does not use this command. It is accepted only for compatibility with MS-DOS files.
This tool is not available on Windows XP 64-Bit Edition.
Using the version table Many programs designed to run with a previous version of MS-DOS run

correctly with Windows XP. In some cases, however, a program might not

run correctly unless its name is included in the version table. The

table indicates to the program that it is running with the MS-DOS

version for which it was designed, even though it is running in the

MS-DOS subsystem. By interpreting MS-DOS version 5.0 as the earlier

version, the program should run correctly, however, setver does not

solve the problem if the program is not compatible with Windows XP.

Full Text Pasted Below:

setver c: SetverSets the MS-DOS version number that the MS-DOS

subsystem reports to a program. Used without parameters, setver

displays the current version table.

Syntax
setver [Drive:path] [FileName n.nn]

setver [Drive:path] [FileName [/delete [/quiet]]

To display the current version table, use the following syntax:

setver [Drive:path]

Parameters
[Drive:path]
Specifies the location of the Setver.exe file.
FileName
Specifies the name of the program file (.exe or .com) that you want to

add to the version table. You cannot use a wildcard (* or ?).
n.nn
Specifies the MS-DOS version (for example, 3.3 or 4.01) that the MS-DOS

subsystem reports to the specified program file.
/delete
Deletes the version table entry for the specified program file. You can

also use /d.
/quiet
Hides the message that is usually displayed when you delete an entry

from the version table.
/?
Displays help at the command prompt.
Remarks
Windows XP does not use this command. It is accepted only for

compatibility with MS-DOS files.
This tool is not available on Windows XP 64-Bit Edition.
Using the version table
Many programs designed to run with a previous version of MS-DOS run

correctly with Windows XP. In some cases, however, a program might not

run correctly unless its name is included in the version table. The

table indicates to the program that it is running with the MS-DOS

version for which it was designed, even though it is running in the

MS-DOS subsystem. By interpreting MS-DOS version 5.0 as the earlier

version, the program should run correctly, however, setver does not

solve the problem if the program is not compatible with Windows XP.

Loading the version table into memory
Before you can use setver, the version table must be loaded into memory

by inserting a device command in your Config.nt file.

Restarting after updating the version table
When you update the version table by adding or deleting entries, you

must start a new command prompt session to reread the version table.

Updating existing entries
If you specify a file name that is already in the version table, the

new entry replaces the existing entry.

Understanding setver exit codes
To process exit codes returned by setver, use the errorlevel parameter

on the if command line in a batch program. For an example of a batch

program that processes exit codes using if, see Related Topics. The

following table lists each exit code and a description.

Exit code Description
0 Setver successfully completed its task.
1 The user specified an invalid command-line option.
2 The user specified an invalid file name.
3 There is insufficient system memory to carry out the command.
4 The user specified an invalid version number format.
5 Setver cannot find the specified entry in the version table.
6 Setver cannot find the Setver.exe file.
7 The user specified an invalid drive.
8 The user specified too many command-line options.
9 Setver detected missing command-line options.
10 Setver detected an error while reading the Setver.exe file.
11 The Setver.exe file is corrupt.
12 The specified Setver.exe file does not support a version table.
13 There is insufficient space in the version table for a new entry.
14 Setver detected an error while writing to the Setver.exe file.

Examples
To run Myprog.exe, a file that runs with MS-DOS version 3.30, create an

entry in the version table that enables Myprog.exe to interpret the

MS-DOS subsystem as version 3.30 by typing:

setver myprog.exe 3.30

To delete the Myprog.exe entry from the version table, without

otherwise affecting the Myprog.exe file, type:

setver myprog.exe /delete

To list the contents of the version table on drive C, type:

setver c:

Formatting legend
Format Meaning
Italic Information that the user must supply
Bold Elements that the user must type exactly as shown
Ellipsis (...) Parameter that can be repeated several times in a

command line
Between brackets ([]) Optional items
Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one
Courier font Code or program output
 
If it's an in-house program then get IT dept to recompile as a 32-bit exe. If it's bought in program, get an update from the vendor.

There is no real excuse in a professional environment to be running a 10 year old version!

All the hacks and workarounds are intended for short term use while you get the new version sorted - not as a permanent solution

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

UK steam enthusiasts:
 
Just use an older version of DOS, and boot off of a floppy disk. Its really pretty simple.
 
There are two prompt windows: CMD and COMMAND. 16-bit applications work quite well with COMMAND.

From the Run prompt, type COMMAND and run you program from the command prompt window that pops up.

 
I have been facing the same problem. I think, it actually happened when one of the shareware programs was expired. They were running pretty well a few days back and it started all of a sudden. Hope I will get some simple solution.

 
If they were installed on some machine where the date doesn't matter, just change the machine date. On some time expiry programs, moving the date forward before installing also works.
 
If you're using a shareware program that's time expired then pay the man! If the program is worth using, it's worth paying for.

It's difficult to believe that I'm seeing professional engineers recommending theft of intellectual property.

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

UK steam enthusiasts:
 
You mistook it. I had x program for a trial and didn't want it after the trial period(I seldom used it even during trial period). This stops another freeware yfrom functioning after the expiry period. There is absolutely no violation of copyright or intellectual properity rights, whatsoever, from my side.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor