VOGONS


First post, by GeneralHQ

User metadata
Rank Newbie
Rank
Newbie

I have an old game I'd like to run under DosBox from a Windows shell program that I am writing, and I'd like to be able to create a command line from the shell dynamically and pass that command line into the game.

Is there a way for the DoxBox command line to specify not only the game executable and DosBox parameters, but also some command line for the game executable?

Right now, my shell invokes the program with:
dosbox .\MyGame.exe -exit -fullscreen -noconsole

but I'd like to pass MyGame a parameter, such as:
dosbox .\MyGame.exe "MyInfo" -exit -fullscreen -noconsole
Where "MyInfo" is information from my shell program that is passed in as a command line parameter to "MyGame".

The only way I can think of doing it now is by having my shell create a BAT file with ".\MyGame.exe MyInfo" and then having DoxBox invoke the BAT file instead of the program directly, but that solution is less than ideal and may not even work given the nature of my shell.

Am I missing something in the documentation? Ideas?

Thanks.

Reply 1 of 1, by GeneralHQ

User metadata
Rank Newbie
Rank
Newbie

I just did come up with one solution, which I believe will work for me, although it is perhaps less than ideal.

If I create a BAT file called StartIt.BAT that contains the one line:
.\MyGame.EXE %PARM%

Then I can invoke the bat file using the command line:

DosBox .\StartIt.BAT -c "Set PARM=MyParm" -exit -fullscreen -noconsole

I guess in my environment that would work, and is what I will go with for now, but I'd still like to know if there is, or request the addition of, the ability to specify a command line parameter to the game name command line directly from the dosbox command line, without having to go through this kind of kludge.