VOGONS


Switching .conf files

Topic actions

First post, by PC-48

User metadata
Rank Newbie
Rank
Newbie

If i have made and saved a different .conf file for a game how do I load that specific one up when dosbox starts?

Reply 1 of 21, by ripa

User metadata
Rank Oldbie
Rank
Oldbie
README.TXT wrote:

DOSBox will parse configuration files that are specified with -conf. If
none were specified it will try to load "dosbox.conf" from the local
directory.

i.e. <path to dosbox>\dosbox.exe -conf configfile.conf

Reply 2 of 21, by PC-48

User metadata
Rank Newbie
Rank
Newbie

Can you tell me what to add to under my [autoexec] so that it loads automatically everytime? Thank you.

Reply 3 of 21, by ripa

User metadata
Rank Oldbie
Rank
Oldbie

No, you start dosbox with the -conf switch that specifies the conf file that you want to use. Make a shortcut or batch file to dosbox with the switch.

Windows example: you have a config file for Commander Keen called keen.conf (put it where dosbox is for example so that you don't need to specify the whole path to the file). Make a shortcut called "Keen" and make it point to "c:\apps\dosbox-0.73\dosbox.exe -conf keen.conf". When you launch the shortcut, dosbox loads keen.conf.

What I've done is add a context menu item to .conf files called "dosbox". It launches dosbox with the conf file that you clicked. You can do this on Windows from Windows Explorer -> Tools -> Folder Options -> File Types. Find CONF FILE (or create an entry for it if it's not there), select Advanced, New, Action: "dosbox", Application used... blahblahblah: C:\<path to dosbox>\dosbox.exe -conf "%1"
Now you have a context menu item called dosbox on .conf files, which launches dosbox with that config file.

I create a config file for each game (just copy the default config file into a new one and customize it) and add the required stuff to [autoexec] to launch the game automatically when you use the context menu item on the config file.

Last edited by ripa on 2009-07-14, 20:44. Edited 2 times in total.

Reply 4 of 21, by PC-48

User metadata
Rank Newbie
Rank
Newbie

Actually that wouldn't make sense. Can I put the arena.conf file in the arena folder and run it that way? I have C mounted as C:\documents\dos so I dont even know how to access where dosbox actually is.

Reply 5 of 21, by PC-48

User metadata
Rank Newbie
Rank
Newbie

Ok that makes sense now, thank you so much!

Reply 6 of 21, by ripa

User metadata
Rank Oldbie
Rank
Oldbie

Can I put the arena.conf file in the arena folder and run it that way?

Yes if you've added the context menu item or if you've made the shortcut. If you have Arena in c:\documents\dos\arena (which would be c:\arena inside Dosbox), just make a shortcut that points to <path to dosbox>\dosbox.exe -conf c:\documents\dos\arena\arena.conf. Dosbox is installed to program files by default, so it's probably in c:\program files\dosbox-0.73. If the paths have spaces, use double quotes.

edit: sorry for editing posts :-0

Reply 7 of 21, by PC-48

User metadata
Rank Newbie
Rank
Newbie

When I try to edit the shortcut of dosbox and input the file path with dosbox.exe -conf arena.conf it says that the target box is not valid. I have vista 64bit if that helps at all.

Reply 8 of 21, by PC-48

User metadata
Rank Newbie
Rank
Newbie

Ok so I tried to make a batch file and all I put was this line in it: C:\Program Files (x86)\DOSBox-0.73\dosbox.exe -conf arena.conf

It flashes on the screen really quick then thats all, I don't think I made it correctly. I just used notepad to write that text and then changed the extension from .txt to .bat. Any advice would be apprieciated.

Reply 9 of 21, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Use "pause" in your batch file to see the message if it's related to the startup.

Reply 10 of 21, by PC-48

User metadata
Rank Newbie
Rank
Newbie

well where do I put it? i typed this:
"pause"
C:\Program Files (x86)\DOSBox-0.73\dosbox.exe -conf arena.conf

I also tried:
"pause" C:\Program Files (x86)\DOSBox-0.73\dosbox.exe -conf arena.conf

Reply 11 of 21, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

batch file:

dosbox.exe
pause

Reply 12 of 21, by PC-48

User metadata
Rank Newbie
Rank
Newbie

Ok after the pause I added my line:
C:\Program Files (x86)\DOSBox-0.73\dosbox.exe -conf arena.conf

It says:
C:\User\Paul\Desktop>Dosbox.exe
'dosbox.exe' is not recognized as an internal or external command, operable program or batch file.

C:\Users\Paul\Desktop>pause
Press any key to continue . . .

Then the window closes.

Reply 13 of 21, by MiniMax

User metadata
Rank Moderator
Rank
Moderator
PC-48 wrote:

C:\User\Paul\Desktop>Dosbox.exe

Why did you type Dosbox.exe ?

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 14 of 21, by PC-48

User metadata
Rank Newbie
Rank
Newbie

Well I don't know I thought that's what he said to do, wd wrote:
batch file:
Code:
dosbox.exe
pause

I have never made a batch file before so this is all new to me, I don't know all the parameters you need to include or how to make it work, sorry.

Reply 15 of 21, by PC-48

User metadata
Rank Newbie
Rank
Newbie

I wouldn't have to do this batch file crap if what ripa said made sense to me. It seems like i could just add the -conf arena.conf line to the shortcut when I edit it under Target:

But that doesn't work at all.

Reply 16 of 21, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I wasn't aware that you're incapable of replacing dosbox.exe with the full
executable spec that you already posted yourself, sorry.

Reply 17 of 21, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

This is how that BAT-file of yours should look like:

"C:\Program Files (x86)\DOSBox-0.73\dosbox.exe" -conf arena.conf
pause

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 18 of 21, by ripa

User metadata
Rank Oldbie
Rank
Oldbie

It seems like i could just add the -conf arena.conf line to the shortcut when I edit it under Target

You've typoed it or something. Did you forget the double quotes? For example:
"C:\Program Files (x86)\DOSBox-0.73\dosbox.exe" -conf "c:\documents\dos\arena\arena.conf"

Reply 19 of 21, by PC-48

User metadata
Rank Newbie
Rank
Newbie

Yes I forgot the quotes! It works fine now, thanks guys.