Created RunExit tool

A user at the VOGONS forums posted a question about being able to start Windows 3.1 (inside DOSBox) with another application and shutting down that Windows instance (and thus DOSBox) immediately when that application exits. This would normally be accomplished by setting the application as the shell in place of the default (Program Manager) by changing the shell=progman.exe line in SYSTEM.INI to the path of the application's executable.

Unforunately, the program in question refused to cooperate and threw an error message upon starting. Because of that, I created a simple utility using the ancient version 1 of Borland Delphi, as it was the only 16-bit version of Delphi, which is what was required to build a 16-bit program. The utility simply executes whatever file is specified as its first command line argument, waits for it to close and then silently shuts down Windows. For instance, starting it as runexit notepad would start Notepad and, after that closes, return to the DOS prompt. Since win.com itself accepts a command line of an application to start, it would be something like win c:\runexit\runexit notepad.

The tools itself and the Delphi 1 source code can be downloaded off the tools page.

Update (2013-05-25): New version adds support for setting the working directory and passing parameters.

Pingbacks

Comments

sdf

So yes this is exactly what i would want but, the old game i'm trying to run is messed up if i don't startup default shell before anything else. Like i start win then it runs fine if i start it, but otherwise like i add shell=program.exe in the system.ini the windows completely messes up. Even with your runexit program. Anything you can think of to try?

Tyler

Heroic. I searched long and hard for this -- and it works like a charm. Thanks!

Hanyouki 0

Thank you so much for this utility!

It has been an essential element of a little project of mine, where I've been making links on my Windows 7 desktop that directly start Windows 3x programs housed in DOSBox. I couldn't have done it without this!

...As an aside, you may have the prestige of writing the LAST program ever "Designed for Windows 3.1"...

Steven Don

Glad you like it. I doubt it's the last program ever to be designed for Windows 3.1. After all, people are still writing software for the Commodore 64 and for DOS, too. As long as there are enthusiasts, software will be written.

As of today, it's the most recently updated one though. At least for now ;)

Tarik

This is so cool, thank you very much.
I'm building up a setup where I can launch games directly and get back to the launcher (which will be either RetroArch or KODI) and thanks to you I can finally add the great Win 3 games to my collection. Fantastic work!

Post a comment