2010-01-26: Created RunExit tool

Posted at 2010-01-26 02:03:31 by SHD

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.

Comments

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?

Posted at 2012-12-23 12:27:26 by sdf

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

Posted at 2013-01-02 14:09:50 by Tyler

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"...

Posted at 2013-05-23 01:56:06 by Hanyouki 0

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 ;)

Posted at 2013-05-26 18:15:42 by Steven Don

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!

Posted at 2017-08-21 13:51:16 by Tarik

Post a comment

Note: HTML is not permitted, URLs will be linked automatically. Spam comments will result in a permanent ban.
Type these 4 symbols into the edit field