VOGONS


First post, by Riboflavin

User metadata
Rank Newbie
Rank
Newbie

So I have a computer that boots into DOS when it starts, but the idea is to launch a Windows emulator (or game) from the MS-DOS 7 command line... but then have Windows shut down or restart the computer when the emulator or game quits.

Getting it started is actually pretty easy if I just go...

win steem d:\atarist\dsk\popeye2.st

(On my computer this will launch Windows 98 (and auto-log-on with TweakUI) and start the Atari ST emulator STEEM with the extremely esoteric game Popeye 2.)

(and yeah, it probably would be better to go with Monkey Island or something, but Popeye 2 has been a bizarre test-subject)

But here's the trick!

How do I have the computer shutdown or restart when the emulator terminates?

Using linear DOS logic, I thought that all I needed to do was make a batch file that would run a shutdown program after Steem and then launch win.com with that... -but OH NO it seems that Windows runs everything in the batch files as soon as it can! So as soon as windows starts, it would run Steem and the Shutdown program right away. Um... yay multi-tasking.

Maybe there's a command or utility I can add to a batch file like "On Exit" or something?

I'd love to hear any ideas on this one. Thanks!

**Don't forget to enjoy the sauce**

Reply 1 of 2, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

I don't think it is Win98 that is trying to be fast. It is more likely that this Steem program is just a small stub that quickly launches the real Steem emulator, then the stub exists, and Win98 happily carries on with the next command - your shutdown instruction.

Try inserting a PAUSE after launching the Steem stub:

steem
pause
shutdown

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 2 of 2, by Riboflavin

User metadata
Rank Newbie
Rank
Newbie

Well, that was a good idea. Just adding Pause gave me the leeway I needed.

Thanks!

I guess I'm on the road now to learning more advanced windows batch files and scripts from here.

**Don't forget to enjoy the sauce**