VOGONS


First post, by OSH

User metadata
Rank Member
Rank
Member

Hm.
Is it possible to start game immediately after system load from autoexec.bat?
I want Microsoft Flight SImulator 5.1 will start immediately after system load.
But if I insert in autoexec.bat c:\MSFS5.1\fs5.com x - after boot I see only command prompt.

Reply 1 of 18, by dr_st

User metadata
Rank l33t
Rank
l33t

In DOS you typically cannot start applications from a different directory than their own, because they look for their data files in the directory you start them from, not where the executable is.

So you need two commands:

CD \MSFS5.S1
FS5.COM X

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 3 of 18, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie

Are you booting from c: (or floppy) ?
Try:

C:
CD \MSFS5.S1
FS5.COM X

For testing make a separate bat file e.g. MSFS5.BAT and copy the above code into it. Then try to run it after boot. This way you can find out if the problem is with starting the program from autoexec.bat specifically or the commands do not work even from a simple bat file. Then it will be more easy to find out what the problem exactly is.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 4 of 18, by collector

User metadata
Rank l33t
Rank
l33t

Also note that this forum is for DOS games on *modern* systems. For old hardware and OS related questions ask in Marvin. Marvin, the Paranoid Android

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 5 of 18, by OSH

User metadata
Rank Member
Rank
Member

Problem is, I can run this bat, but not from autoexec.bat itself.
Here is my autoexec.bat:

@REM ===== PPLT INITIALIZATION ==========
;@SET PROPATS=C:\GUSINSTA\PPL160
@REM ===== PPLT INITIALIZATION ENDS =====
C:\QEMM\LOADHI /R:2 /LO C:\DOS\SMARTDRV.EXE /X
@ECHO OFF
PROMPT $p$g
PATH C:\QEMM;C:\DOS
rem mscdex.exe /d:banana /L:D
C:\QEMM\LOADHI /R:1 C:\MOUSE.COM
SET TEMP=C:\DOS
SET BLASTER=A220 I5 D1 H5
REM set ultradir=c:\ultrasnd
REM SET ULTRASND=240,7,7,7,7
REM C:\ULTRASND\ULTRINIT
C:\MSFS5.1\fs5.bat

After boot I see prompt. When I now type fs.bat game starts normally. But I want run it without typing anything. It should be started automatically after system was loaded.

Reply 7 of 18, by dr_st

User metadata
Rank l33t
Rank
l33t

You can, it just won't return to the original .bat. Here it is not a problem, since it's the last command anyways.

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 9 of 18, by OSH

User metadata
Rank Member
Rank
Member

Still no luck. I'm very curious: if Norton Commander can be started in this way, why not MSFS5.1?
call command didn't help too...
And one important thing: because I'm trying it under PCEM, if you using DOSBOX, please don't addcommands above into dosbox.conf file but into autoexec.bat itself.

Reply 10 of 18, by AlaricD

User metadata
Rank Oldbie
Rank
Oldbie
OSH wrote:

Problem is, I can run this bat, but not from autoexec.bat itself.

After boot I see prompt. When I now type fs.bat game starts normally. But I want run it without typing anything. It should be started automatically after system was loaded.

Put a pause command above and below the C:\MSFS5.1\fs5.bat line. This way, you'll be prepared to watch the command run. It's possible the line is launching the program but the program itself is returning an error message; perhaps the pause after that will keep it in the screen or at least you'll be looking for it more directly.

"The Big Bang. The ultimate hero of low frequency. The divine intergalactical bass drum connecting the tribes of our solar system."
Yello
"Solar Driftwood"

Reply 12 of 18, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie

No one said pause can fix the problem. Pause/echo can help to determine what/where the problem can be. But you should say more than 'nothing helps'. Disabling echo is not necessary what's more you should enable it. And before/after commands you should insert echo commands to see if a command executed at all or something quits unexpectedly.
So you should put in your fs5.bat file ( or what is called from autoexec.bat):

@echo on
echo hey, I'm the other bat
C:
CD \MSFS5.S1
echo MSFS starts
FS5.COM X
echo MSFS ends

And report back if you see all the messages and after execution ends the actual dir at the prompt is C:\MSFS5.S1

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 13 of 18, by OSH

User metadata
Rank Member
Rank
Member

No. It seems, batch for MSFS wasn't executed. I don't see any messages from ECHO, and actual dir after execution autoexec.bat is still C:\
My MSFS directory is called "MSFS"

Here my autoexec.bat

@REM ===== PPLT INITIALIZATION ==========
@SET PROPATS=C:\GUSINSTA\PPL160
@REM ===== PPLT INITIALIZATION ENDS =====
REM DEVICE=C:\EMM386.exe AUTO RAM
C:\QEMM\LOADHI /R:2 /LO C:\DOS\SMARTDRV.EXE /X
@ECHO OFF
PROMPT $p$g
PATH C:\QEMM;C:\DOS
rem mscdex.exe /d:banana /L:D
C:\QEMM\LOADHI /R:1 C:\MOUSE.COM
SET TEMP=C:\DOS
SET BLASTER=A220 I5 D1 H5
set ultradir=c:\ultrasnd
SET ULTRASND=240,7,7,7,7
C:\ULTRASND\ULTRINIT
call C:\MSFS\fs.bat

And fs.bat

@echo on
hey, I'm other bat
C:
CD \MSFS
echo MSFS starts
fs5.com x
echo MSFS ends

And config.sys:

device=c:\qemm\dosdata.sys
DEVICE=C:\DOS\SETVER.EXE
REM DEVICE=c:\EMM386.exe AUTO RAM
DEVICE=C:\QEMM\QEMM386.SYS RAM R:1
device=c:\qemm\dos-up.sys @c:\qemm\dos-up.dat
DEVICE=C:\QEMM\LOADHI.SYS /R:1 /SIZE=11520 C:\QEMM\QDPMI.SYS SWAPFILE=DPMI.SWP SWAPSIZE=1024
DEVICE=C:\OAKCDROM.SYS /D:BANANA
DEVICE=C:\MOUSE.SYS
DOS=HIGH,UMB
FILES=30
SHELL=C:\QEMM\LOADHI.COM /R:2 C:\COMMAND.COM C:\ /P

Reply 14 of 18, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie

You have missed the echo command before the 'hey...' message in your fs.bat, but you should have seen an error instead of nothing. So further testing is required. Put the call to fs.bat to the beginning of autoexec.bat and also put and echo before it. So the first 3 lines of your autoexec.bat should be:

@echo on
echo hey, I'm autoexec bat
call C:\MSFS\fs.bat

Also put a REM before @ECHO OFF in autoexec.bat temporarily (REM @ECHO OFF).
This way you can check if 1. autoexec.bat is called correctly 2. whether a command within autoexec breaks the execution before the call at the end.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 15 of 18, by AlaricD

User metadata
Rank Oldbie
Rank
Oldbie
OSH wrote:

And one important thing: because I'm trying it under PCEM

Can you adjust the CPU speed in PCem? If so, slow it waaaay down so you have time to read messages that might flash off the screen.

"The Big Bang. The ultimate hero of low frequency. The divine intergalactical bass drum connecting the tribes of our solar system."
Yello
"Solar Driftwood"

Reply 16 of 18, by OSH

User metadata
Rank Member
Rank
Member

Falcosoft, you won't believe, what was a cause...

https://imgur.com/a/Xn7C1

This is my config.sys. The cause was this small arrow behind ULTRINIT. I can't even reproduce this sign, so I give screenshot with config.sys. When I deleted it, MSFS finally starts normally.
BIG THANKS!

Reply 17 of 18, by Gene Wirchenko

User metadata
Rank Member
Rank
Member
krcroft wrote:

So long as you explicitly 'exit' at the end of a bat file, control will return to the parent batch file.

Nope. It will terminate the command shell (or DOSBox). Try the following. (Note that "tmp1.bat:" and "tmp2.bat:" are the names of files to put the following commands in, not labels.)

tmp1.bat:
echo tmp1 start
tmp2
echo tmp1 end

tmp2.bat:
echo in tmp2
exit

Take out the exit, and the batch execution will stop at the end of tmp2. To get nested batch files, use call:

tmp1.bat:
echo tmp1 start
call tmp2
echo tmp1 end

tmp2.bat:
echo in tmp2

Sincerely,

Gene Wirchenko