Update to RunExit tool

This is an update to the RunExit tool I created a few years ago for Windows 3. The original tool just plain ran the program and waited for it to complete. It didn't set the working directory for the program it ran (which messed up some programs, such as the games from Microsoft's Best of Entertainment pack) and didn't pass parameters, which may limit the usefulness in some other cases.

I've now updated the tool so it does both. For instance, you might run a game with a command line parameter like so:

win c:\runexit\runexit c:\games\mygame\mygame.exe /cheatmode

That starts Windows, which in turn starts RunExit, which then runs MYGAME.EXE in the directory C:\GAMES\MYGAME and passes it /cheatmode on its command line. After the game exits, RunExit shuts down Windows, returning to the DOS Prompt.



Good post


I have a file that I have to run with parameters as well as with different working directory. How would the syntax look like?

Steven Don

Well, Michal, the total syntax consists of the following parts:

  1. "win", which starts Windows
  2. "c:\runexit\runexit.exe", which tells Windows to start "runexit.exe" which in tself is located in "c:\runexit"
  3. the full path to the program you're trying to run, so you might be trying to run "c:\lotus\123.exe". The current path will be "c:\lotus" and the program started by RunExit will be "123.exe"
  4. "/some /parameters", everything else is passed as a parameter to the program specified in part 3.
So for that example, it'd be: win c:\runexit\runexit.exe c:\lotus\123.exe /some /parameters


Thanks very much. Must say the reply was very quick.
Wondering if you could help me with one more thing. I really need to get around 100 different apps running for university students to use. I can get some of them running but some of them are closing immediately. If I will be quick enough I can click on dosbox window I can get it to "stay" but otherwise it just closes straight away.


In some games it does not work type: Abracadabra Pink Panther - Pink Panther Passport to danger ... giving error loading


runexit to add a timer to start the game
sorry for my english


I solved it, it was enough to install Windows internal drivers without installing Driver SB16.
Runexit works great


I tried your utility with Check Mate Plus (a cash book program). But it simply opens windows shell and nothing else happens. I gave the following command from dosbox "C:\windows\win c:\runexit\runexit c:\chkmate\cmpwin.exe". Where am i going wrong?


I have solved the problem. I was using Dosbox SVN Daum custom build. I tried to revert back to the last official version 0.74 and it worked like a charm. Thanks for the tool


Does not work with SimCity 2000 for Win3.1
I think its the fault of WinG.

Paul Galbraith

This works great for me, I'm able to seamlessly run Iron Helix under dosbox/win31. Thanks!!

I run as "WINDOWS\WIN.COM C:\RUNEXIT\RUNEXIT.EXE C:\HELIX\HELIX.EXE" from dosbox. I think the ".exe" qualification is required for both runexit.exe and helix.exe to have things working.

MB ZombiVoziKombi

Great program, thank you. Sadly it doesn't seem to work with civ2: windows shell opens, but the program doesn't run.

Tested it with a few other programs: same behavior with Creative sound mixer, but it works fine with built-in windows apps (notepad, file manager, print manager). I'm running the latest development version of dosbox 0.74 from gentoo on sabayon gnu/linux.


RunExit causes Windows 3.1 to pop up an Application Execution Error saying "One of the library files needed to run this application is damage.d Please reinstall this application." Happens during Windows startup or if I try to run it directly from File > Run in Program Manager. Tried multiple downloads, including the most recent -- never got it to run.

Paul Galbraith

I couldn't get this to work with Civilization, so installed Delphi 1 in the hopes of debugging things. Unfortunately Delphi 1 seems to want breakpoints to be set in a unit PAS file, but this has all the code in the DPR file which is foiling my attempt to debug ... am I doing something wrong?


Hey all,

I was having the same problem as some users. It looked like RUNEXIT.EXE didn't work, but I found out that copying the binary in the folder of the game works well.

For example, in the case of CivNET, you'd need to copy RUNEXIT.EXE in the folder C:\CivNET containing CivNET.exe, and run the game with C:\WINDOWS\WIN.COM C:\CIVNET\RUNEXIT.EXE C:\CIVNET\CIVNET.EXE.

I have no ide what causes this, but it works great. Thank you very much for this nifty program!


The program seems to have some difficulty passing on the working directory. I've noticed this in other programs, but most recently when I tried using it to launch Kings Quest 7, which very specifically wants the root directory of the CD-ROM drive to be the working-dir.

The readme says to use:

win.com c:\pathto\runexit c:\program\program.exe c:\workdir /parameters

So I use:

win.com c:\windows\runexit.exe C:\SIERRA\KQ7\SIERRAWS.EXE D:\ C:\SIERRA\KQ7\RESOURCE.WIN

win.com c:\windows\runexit.exe <-- self explanatory
C:\SIERRA\KQ7\SIERRAWS.EXE <-- program to be launched
D:\ <---working dir
C:\SIERRA\KQ7\RESOURCE.WIN <-- parameter (dir to config file req. by game)

At first I didn't specify the working-dir and got an error message indicating the program was unable to locate a file found on the CD-ROM. I get the exact same error message if I use D:\. The game launches correctly from windows, but gets the same error message if I null out the working-dir from its short-cut. This makes me think the working-dir isn't being correctly passed on by runexit.


Hello, Guys! Sorry for my bad english, i'm from Russia. Your problem with the script not working can be easily solved. Just duplicate runexit according to my example: "win C: \ OTCD \ RUNEXIT.EXE C: \ OTCD \ RUNEXIT.EXE C: \ OTCD \ OREGON.EXE" and there will be no problem. Before that I tried many methods, nothing helped in some cases. Don't thank.

Post a comment