VOGONS


First post, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

I'm trying to automate some stuff with the help of Windows CMD-Files (=batches). I basically want to start DOSBox with two different .conf files (one containing the basic DOSBox config, the other an additional [Autoexec]-section with certain commmands). Additionally i'd like to pass a "set"-command via the "-c" function.

The command line would look like this:

dosbox.exe -conf dosbox.conf -conf "x:\somedir\dosbox autoexec.conf" -c "set variable=value"

This doesn't work as expected. Both .conf-files are "executed", but the "set"-command is ignored. I've tried removing the ""s around the second .conf filename and using a filename without spaces, but the "set"-command is still ignored. I've also tried using only one .conf file, but that doesn't work as expected, either.

Is there an explanation for this? Reading the readme, i had assumed that i can use multiple .conf files and "-c" arguments on the command line. Am i wrong with that assumption? Or could this be a quoting/parsing problem of the Windows "shell"?

Reply 1 of 2, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author
dosbox -conf dosbox.conf -c "set a=b"

works fine at my place.
could you see what is inside autoexec.bat on z:\

the set command does end up as last command in autoexec.bat at my place

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 2, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

Agh, i know why it's not working... I have a "call" command at the end of the .conf with the autoexec commands in it, so the "-c" command is probably called after that "call". I guess i'll try to move the "call" command to the command line, then it should work. Sorry, i wasn't aware that DOSBox appends the "-c" command at the end of autoexec.bat.