VOGONS

Common searches


First post, by Vaelor

User metadata
Rank Newbie
Rank
Newbie

Hi all,

I'm having some trouble getting my games to work with sound functional, when I try to run to run them from a Windows shortcut, using DOSbox with command line parameters.

They all work fine when I just run DOSbox itself, mount the drive manually, and then manually run the game's EXEs, and also fine through a front-end like D-Fend, but I specifically want to run them with command-line parameters so I can just create shortcuts to run straight off my desktop or Start menu.

As an example of the syntax I've tried, here's the command line I used to run Fury of the Furries:-

"D:\Program Files\DOSBox\dosbox.exe" "E:\Fury of the Furries\FURY.EXE" -exit -fullscreen -conf "D:\Program Files\DOSBox\DOSBOX.CONF"

I've also tried shortening the directories to the DOS compatible 8 character names, ie.:-

D:\PROGRA~1\DOSBOX\dosbox.exe E:\FURYOF~1\FURY.EXE -exit -fullscreen -conf D:\PROGRA~1\DOSBOX\DOSBOX.CONF

Another game I've tried was Leisure Suit Larry 7, with the same results:-

"D:\Program Files\DOSBox\dosbox.exe" "E:\Leisure Suit Larry 7\SIER.EXE" -exit -fullscreen -conf "D:\Program Files\DOSBox\DOSBOX.CONF"

And the DOS filename attempt:-

D:\PROGRA~1\DOSBOX\dosbox.exe E:\Leisure Suit Larry 7\SIER.EXE -exit -fullscreen -conf D:\PROGRA~1\DOSBOX\DOSBOX.CONF

As you can see, my goal is to run FURY.EXE (or SIER.EXE) via DOSBox, in fullscreen mode, to exit once the game is terminated, using the default configuration file.

Both games, as I mentioned, work just fine if I just run DOSBox, mount the drive, CD to the directory, and run the EXE. They also both work fine if I mount them in D-Fend and run them that way. However, clearly something is wrong with either my command line syntax, or my config file, because when I try to run them via the above commands, the games load and run fine, but completely soundless!

Can anybody make sense of this puzzling issue and tell me what I'm doing wrong, or help me troubleshoot what I'm missing or overlooking to successfully run my games via command line with working sound?

Thanks in advance!

Vaelor's Keep

Reply 1 of 21, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

You have told us what you could not get to work, with some fine examples. Thank you for that.
But you didn't show us what worked (the correct result), so how are we supposed to convert the correct result into a working command line?

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 21, by Vaelor

User metadata
Rank Newbie
Rank
Newbie

I'm sorry MiniMax, but I have absolutely no comprehension of what it is you're asking me here! I have not managed to get any games to work properly using DOSbox via command line mode. The two I mentioned in my first post are the two I've tried, with the results as mentioned above. If I'd got another game working via command line successfully, I would know the answer to my problem already!

What information exactly is it that you're asking me to provide here?

Vaelor's Keep

Reply 3 of 21, by ErikGG

User metadata
Rank Member
Rank
Member

DFend has a feature to save Windows links. So if you would save it then you could check out what DFend made from it.

As for the commandlines you gave, they are more or less wrong. Partially.

"D:\Program Files\DOSBox\dosbox.exe" "E:\Fury of the Furries\FURY.EXE" -exit -fullscreen -conf "D:\Program Files\DOSBox\DOSBOX.CONF" 

I see a few problems with it.
First, remove the "E:\Fury of the Furries\FURY.EXE".
Secondly, remove the -exit and the -fullscreen command.
Third : -conf "D:\Program Files\DOSBox\DOSBOX.CONF", with this line you're using the DOSBox.conf file that is standard for DOSBox, unless you changed it.

The thing to get this to work is, make a copy of DOSBox.conf and then alter fullscreen in the SDL section to true, this replaces the -fullscreen commandline parameter.
Secondly in the Autoexec section, you must type in all commands (mounts and execs) that DOSBox needs to execute on startup. At the end of these commands type in Exit. This replaces the -exit commandline parameter. IF you are using a bat file to start the game. Use "call Start.bat" to start the game, else DOSBox will terminate immediatly.

Use a link with the following:

"D:\Program Files\DOSBox\dosbox.exe"  -conf "D:\Program Files\DOSBox\DOSBOXcopy.CONF" 

Hope this helps.

Erik.

Read the new FAQ.doc

Reply 4 of 21, by Vaelor

User metadata
Rank Newbie
Rank
Newbie
ErikGG wrote:
As for the commandlines you gave, they are more or less wrong. Partially. […]
Show full quote

As for the commandlines you gave, they are more or less wrong. Partially.

Code:
"D:\Program Files\DOSBox\dosbox.exe" "E:\Fury of the Furries\FURY.EXE" -exit -fullscreen -conf "D:\Program Files\DOSBox\DOSBOX.CONF"

I see a few problems with it.
First, remove the "E:\Fury of the Furries\FURY.EXE".
Secondly, remove the -exit and the -fullscreen command.

Well now, that's extremely strange, to say the least. I was following - or at least, I thought I was - the command line syntax as described in the README.TXT of DOSbox, as per:-

README.TXT wrote:
dosbox [name] [-exit] [-c command] [-fullscreen] [-conf congfigfile] [-lang languagefile] [-machine machinetype] [-nocon […]
Show full quote

dosbox [name] [-exit] [-c command] [-fullscreen] [-conf congfigfile]
[-lang languagefile] [-machine machinetype] [-noconsole]
[-startmapper]

name
If "name" is a directory it'll mount that as the C: drive.
If "name" is an executable it'll mount the directory of "name"
as the C: drive and execute "name".

-exit
dosbox will close itself when the DOS application "name" ends.

-fullscreen
Starts dosbox in fullscreen mode.

-conf configfile
Start dosbox with the options specified in "configfile".

Ergo, in place of [name], I placed the full path and filename of the executable, which according to the readme, will tell DOSbox to mount the directory and then execute the file. I included the -exit and -fullscreen parameters accordingly, and told it to use the basic DOSbox config file for everything else. I figure the games run perfectly when I just run DOSbox with no command line parameters and then manually mount and run the games, so the default config is clearly functional.

But, you're saying, I should completely disregard the entire command line syntax, and instead create a seperate config file for each game I want to run, and under the AUTOEXEC section of each, just type the commands to mount and launch the game as I normally would manually, and then just run DOSbox with the unque conf file as the only command line parameter??

Well, I just tried this with Fury of the Furries. To run this game manually, I would normally launch DOSbox, and then in the virtual DOS mode, I would type:-

MOUNT C E:\FURYOF~1
C:\
FURY.EXE

And it works fine. So, as per your instructions, I created a seperate config file as a copy from the original, changed fullscreen to true, and added the following to the AUTOEXEC section:-

MOUNT C E:\FURYOF~1
C:\
FURY.EXE
EXIT

When I then try to run this using this command line:-

"D:\Program Files\DOSBox\dosbox.exe" -conf "E:\Fury of the Furries\FURY-DOSBOX.CONF"

DOSbox initializes, then quits immediately, possibly with some error message that is closed much too fast for me to read.

So, my questions are two-fold. First of all, why would DOSbox have command line support options, if one is just supposed to ignore them all and just use seperate config files with different autoexec's for each game? And secondly and more important - what do I do now??

Thanks again.

Vaelor's Keep

Reply 5 of 21, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

to change drives (in the autoexec example) use c: not c:\
futher try putting the executable you want to run as the last command. Although it shouldn't make a difference.

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

Reply 6 of 21, by Vaelor

User metadata
Rank Newbie
Rank
Newbie
Qbix wrote:

to change drives (in the autoexec example) use c: not c:\

Bah, of course! This was a silly typo on my part. Of course I was always using C: when loading it manually (C:\ is an invalid command, after all!), but in my AUTOEXEC, I did actually have C:\ which was producing the error!

Qbix wrote:

futher try putting the executable you want to run as the last command. Although it shouldn't make a difference.

The difference it made was that by removing the EXIT command, the window remained open so I could see the "Invalid command" error I was getting on my silly C:\ typo!

I notice your profile says you're the DOSBox author - perhaps you might be able to tell me, is loading games this way, with a seperate config and autoexec for each game I want to run, the best way to use DOSbox from the command line? And if so, why have the [name] parameters and so on available in the DOSbox command line syntax, and advised to be used that way in the README.txt file? I followed the readme instructions to the letter and got no results, but following ErikGG's instructions (once I corrected my trailing slash error!) achieves my goals perfectly, but nothing about doing it this way is mentioned in the DOSbox readme file? I'm curious as to why this is?

Thanks again for your help!

Vaelor's Keep

Reply 7 of 21, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author
Vaelor wrote:
Qbix wrote:

futher try putting the executable you want to run as the last command. Although it shouldn't make a difference.

The difference it made was that by removing the EXIT command, the window remained open so I could see the "Invalid command" error I was getting on my silly C:\ typo!

I was refering to

"D:\Program Files\DOSBox\dosbox.exe" "E:\Fury of the Furries\FURY.EXE" -exit -fullscreen -conf "D:\Program Files\DOSBox\DOSBOX.CONF"

Perharps it would work better if you did

"D:\Program Files\DOSBox\dosbox.exe"  -exit -fullscreen -conf "D:\Program Files\DOSBox\DOSBOX.CONF" "E:\Fury of the Furries\FURY.EXE"

About the question what is best ? Well dunno. Most people find a configuration file confusing, so that's why the method isn't mentioned in the readme. Aside from that the method mentioned the readme should work.
It works for me. (and I use it a lot)

usually I use it like this

dosbox ./GAME.EXE

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

Reply 8 of 21, by Vaelor

User metadata
Rank Newbie
Rank
Newbie
Qbix wrote:

About the question what is best ? Well dunno. Most people find a configuration file confusing, so that's why the method isn't mentioned in the readme. Aside from that the method mentioned the readme should work.
It works for me. (and I use it a lot)

Ahh well. Using the command line syntax exactly as instructed by the README.TXT file doesn't seem to work for me for some reason, but using the configuration file autoexec method seems to work fine, and in the end, it achieves the end result I was looking for (being able to run games via DOSbox using just a Windows shortcut instead of a front-end like D-Fend), so in the end, mission accomplished, I'm happy!

Great work by the way, you're a true hero of the gaming world for creating and maintaining this application. Anybody who works to preserve the art of vintage gaming is a legend in my eyes. Also, by the way, I love your forum avatar. >;)

Vaelor's Keep

Reply 9 of 21, by ErikGG

User metadata
Rank Member
Rank
Member

Using the commandline is a possibility, but I myself don't like it, because I don't understand it yet what and how it does things. Still need to experiment with it.

Whenever using the conf file method, and you get an error, then remove the Exit command as you noticed.

The conf file way is an easy method, less error prone and easy debuggable then the commandline way.

It is possible to completely dispose of conf files and only use commandlines, but this is for me still "over my head". I'm looking into it, so that D.O.G. can generate Windows links that won't need a conf file but thats for the future.

Have fun...

Erik.

Read the new FAQ.doc

Reply 10 of 21, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Could somebody on windows confirm that it doesn't work anymore using the command line ? (preferably by using the paths used by Vaelor)

I don't see anything wrong with it at first glance.

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

Reply 12 of 21, by Vaelor

User metadata
Rank Newbie
Rank
Newbie
ErikGG wrote:

The conf file way is an easy method, less error prone and easy debuggable then the commandline way.

It is possible to completely dispose of conf files and only use commandlines, but this is for me still "over my head". I'm looking into it, so that D.O.G. can generate Windows links that won't need a conf file but thats for the future.

Yes, I find this is the situation I'm in now myself. I would very much prefer to do things via the command line method, but it is over my head as to why it will not work for me, so in the meantime, I will be content with using the conf file method until I or somebody else can work out why my command lines do not work at all.

Vaelor's Keep

Reply 14 of 21, by ErikGG

User metadata
Rank Member
Rank
Member

I just tried out the commandline vaelor mentioned in the first post and it works with the latest CVS, Didn't try the 0.65 version yet.

"C:\Program Files\DOSBox\dosbox.exe" "C:\SimCity 2000\SC2000.EXE" -exit -fullscreen -conf "C:\Program Files\DOSBox\DOSBOX.CONF"

Vaelor maybe your DOSBox.conf has some autoexec in it, if so remove that one.

And another thing, it seams that DOSBox using this method, mounts the directory "C:\SimCity 2000" as a harddrive, witch means that the game is directly on the HD without any directory structure whatsoever. The game might be crashing because of that.

Erik.

Read the new FAQ.doc

Reply 15 of 21, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author
ErikGG wrote:
I just tried out the commandline vaelor mentioned in the first post and it works with the latest CVS, Didn't try the 0.65 versio […]
Show full quote

I just tried out the commandline vaelor mentioned in the first post and it works with the latest CVS, Didn't try the 0.65 version yet.

"C:\Program Files\DOSBox\dosbox.exe" "C:\SimCity 2000\SC2000.EXE" -exit -fullscreen -conf "C:\Program Files\DOSBox\DOSBOX.CONF"

Vaelor maybe your DOSBox.conf has some autoexec in it, if so remove that one.

Good point
Add -noautoexec as parameter

And another thing, it seams that DOSBox using this method, mounts the directory "C:\SimCity 2000" as a harddrive, witch means that the game is directly on the HD without any directory structure whatsoever. The game might be crashing because of that.

Correct. That is a disadvantage of that method. However you can specify manual mountpoints and run the game while browing your harddisk by using -c options

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

Reply 16 of 21, by ErikGG

User metadata
Rank Member
Rank
Member

But now that we're talking about it, one question...

How does one change cores or any other value of a conf file using the commandline -c? core=dynamic?

If possible you could make a commandline that doesn't need any conf file whatsoever.

Erik

Read the new FAQ.doc

Reply 17 of 21, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

there are a few ways.
This is the easiest
-c "core dynamic"
(-c commands are always executed before a [name] executable and in the order as you type them. So instead of a [name] executable you can do -c "mount command" -c "c:" -c "cd game" -c "game.exe" -c "exit" )
The amount of -c commands is currently limited to 10 though.

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

Reply 19 of 21, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

if you want more feel free to submit a feature request 😉
it are only 2 lines I think. but at that time I didn't think that anybody would need more then 10 -c commands 😀

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