![]() |
Last Visit : never :: 2010-8-01 @ 01:49 am : Now | |||
FAQ |
Search |
Memberlist |
Usergroups |
|
Register |
Profile |
Messages |
Log in |
|
| Forum Index :: DOSBox Games/Apps :: | |
Automate exiting of Windows 3.1 post-EXE launch
|
|
|---|---|
Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-25 @ 09:02 am
|
|
|
omnirune Newbie Joined: 2010-01-25 Posts: 5 |
I'm attempting to automate the exiting of Windows 3.1 after an executable terminates, thus cleanly exiting Dosbox:
[autoexec] # Lines in this section will be run at startup. @echo off mount c windows C:\WINDOWS\SMARTDRV.EXE /L PATH C:\WINDOWS; SET TEMP=C:\WINDOWS\TEMP win c:\games\arthur\arthur.exe exit The part that is hanging up right now is when the "arthur.exe" application is closed, I drop back into Windows 3.1. When I exit Windows, the Dosbox application terminates as expected. Is there a method to automatically shutdown Windows 3.1 once the called upon application is closed? |
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-25 @ 11:05 am
|
|
|
DosFreak Freaky Ram Thing Joined: 2002-06-30 Posts: 7362 Location: Your Head |
You can probably modify how you launch the programs in Windows 3.1 to exit back to DOS after the proram exits and then the CLI will quit due to the "exit" command you have in [autoexec] _________________ Game Acronym List DosBox CVS Builds DosBox Wish List DosBox FAQ PC Game Compatibility List DOSBox Video Tutorial Quote: I am the Milkman. My milk is delicious
|
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-25 @ 11:29 am
|
|
|
Kippesoep Met lettertjes! Joined: 2005-05-04 Posts: 994 Location: Netherlands |
I suppose you can do this with a custom SYSTEM.INI. Rather than having it open the default PROGMAN.EXE (Program Manager) using the "shell=" setting, you could have it open the game instead, effectively replacing the Program Manager shell with the game, turning Win3.1 into a single-task system which will close as soon as its shell (the game) terminates.
Also, get rid of the SMARTDRV line. Disk caching inside DOSBox doesn't anything useful, as the host OS does a better job at caching without interfering with the emulation. Edit: corrected typo. Last edited by Kippesoep on 2010-1-25 @ 12:42 pm; edited 1 time in total _________________ My site: Ramblings on mostly tech stuff. |
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-25 @ 12:11 pm
|
|
|
Dominus l33t Joined: 2002-10-03 Posts: 2061 Location: Vienna |
Kippesoep is right with the shell= command in system.ini.
I also recommend you write Set PATH=z:\;C:\WINDOWS since I'm not sure that just writing "PATH C:\WINDOWS; " sets it at all and you might want to keep Dosbox' built in utilities at hand (thus keeping z:\ in the path) |
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-25 @ 02:25 pm
|
|
|
IIGS_User Dapplegrey Developer Joined: 2007-03-14 Posts: 554 Location: native_lang=ger |
Or install Winexit, call it after calling your game, right in the autoexec section, just before exiting DOSBox:
http://www.win31.de/esoft.htm Win31.de wrote: Shuts down Windows immediately (i.e. without showing a dialogue box) when double-clicked. _________________ Klimawandel. |
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-25 @ 07:13 pm
|
|
|
omnirune Newbie Joined: 2010-01-25 Posts: 5 |
Some great suggestions here.
Unfortunately, I am unable to run the application as the program manager replacement, so this suggestion, at least in this particular case, will not work. The WinExit suggestion adds a nice icon to the desktop that, upon clicking, will drop back into DOS. I'm looking for a clean exit from DosBox immediately after the application closes, if possible, so that a child would not need to click the WinExit icon as the final step. I have found numerous programs that will exit windows upon execution, such as WinExit (NOT TO BE CONFUSED WITH THE OTHER WINEXIT PROGRAM LINKED ABOVE): http://files.chatnfiles.com/WinSitedotc...index.html However, I cannot find a way that will execute the application (ex: win arthur.exe) and then execute winexit immediately after application close. If I were to add winexit.exe in the next line of the BAT, it executes after dropping out of windows. I have tried adding winexit to the startup items, but it will terminate windows and the arthur.exe upon entry into windows. Is there a known spawn application that, upon launching windows, I can add it to the startup items and then it will sequentially launch applications, going to the next application in the list when the first application terminates? Or is there some other way for the second item in the batch file to launch, post termination of first application, within windows 3.1? Thanks again for the prior quick feedback! |
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-25 @ 07:21 pm
|
|
|
Kippesoep Met lettertjes! Joined: 2005-05-04 Posts: 994 Location: Netherlands |
omnirune wrote: Unfortunately, I am unable to run the application as the program manager replacement, so this suggestion, at least in this particular case, will not work.
If you mean that you also need access to the program manager, this is still possible. There is also a run= line in there that allows you to start PROGMAN.EXE too. It just no longer controls the main shutdown in that case. If there's another reason as to why that wouldn't work for you, be sure to actually post the reason, as workarounds may exist. One alternative is to create a program that actively starts the executable you need and forces a Windows shutdown once the application has terminated. Sounds like a bad thing to do and requires actual work on your part. Oh, and batch files are of absolutely no use in this case. One cannot serialize Windows programs that way. _________________ My site: Ramblings on mostly tech stuff. |
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-25 @ 07:39 pm
|
|
|
omnirune Newbie Joined: 2010-01-25 Posts: 5 |
The game in question is "Arthur's Teacher Trouble," a Living Books interactive story.
I copied the Arthur.exe alongside its /Data and other files directly into the windows directory. Next, in System.ini, I changed the shell to arthur.exe. When windows launches, I get a "invalid or missing book outline file" error. I've tried copying all files into every directory in an effort to see if the active path was something other than /windows. No success. If I restore progman.exe and launch arthur.exe from the run command inside windows 3.1 (and keeping the files copied as was in the above scenario) the application launches without error. This is the reason why I'm attempting to find an alternative method of launching and cleanly quitting the application.. I hope this helps! ![]() |
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-25 @ 07:45 pm
|
|
|
Kippesoep Met lettertjes! Joined: 2005-05-04 Posts: 994 Location: Netherlands |
Oh dear. Don't copy stuff directly into the Windows folder. Just install the program normally in its default location. Try setting the shell line to something like "shell=c:\arthur\arthur.exe" instead.
The problem could be that the program depends on a function of progman, which could potentially be solved by added progman.exe to the run= line. If it needs it running before that, there may be another problem and then you would indeed need a separate program as I described earlier. _________________ My site: Ramblings on mostly tech stuff. |
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-25 @ 08:11 pm
|
|
|
omnirune Newbie Joined: 2010-01-25 Posts: 5 |
Ordinarily I would leave the windows directory prestine and the applications separate, but I copied the game directly into the directory as a last choice troubleshooting step.
As you have pointed out, its probable and it seems likely in this case that progman is required for the successful operation of this application. Despite adding progman.exe to the load= or run= line in win.ini, the application does not launch successfully as a shell replacement. Thus I am looking for some technique to terminate win 3.1 upon close of application automatically, however, I am not having success in finding an application that would manage this. I believe the terminology is spawning, and an application would spawn if the state of another application changes to a defined criteria. Thank you for your troubleshooting advice, Kippesoep. |
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-25 @ 08:46 pm
|
|
|
wd DOSBox Author Joined: 2003-12-03 Posts: 9334 |
Please don't abuse the dosbox forum for completely unrelated things like this. |
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-26 @ 01:11 am
|
|
|
Kippesoep Met lettertjes! Joined: 2005-05-04 Posts: 994 Location: Netherlands |
Here you go, omnirune. I've built a simple program to fullfill that function.
Just place the runexit.exe file in a folder called "runexit" in the mounted C drive's root then start Windows 3.1 using "win c:\runexit\runexit c:\games\arthur\arthur". _________________ My site: Ramblings on mostly tech stuff. |
|
|
Re: Automate exiting of Windows 3.1 post-EXE launch :: 2010-1-26 @ 04:11 am
|
|
|
omnirune Newbie Joined: 2010-01-25 Posts: 5 |
Thank you!
This worked! I had to do an additional step to get Arthur's Teacher Trouble to work: I copied pages.512 into the c: root and changed the \data\ reference within the file to the absolute path (c:\game\arthur\data\). This above thread will enable you to: Launch DosBox Automatically load Arthur's Teacher Trouble within Win 3.1 Close Win 3.1 and DosBox upon close of Arthur's Teacher Trouble Perfect for an educational setting. Again, thank you Kippesoep. In hindsight, due to a bug in the Living Books Player, it seems if I was able to discover that I could copy "pages.512" into the root sooner, the application built by Kippesoep would have not be necessary. What is advantageous about this implementation, however, is it allows a shared /win31 installation to save disk space. |
|
|
|
page 1 of 1
|
|
| All times are GMT |
| Moderate |
|---|
| Quick Reply & Options | |
|---|---|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum |
|
2002-2003 zetafleet.dom.