VOGONS

Common searches


First post, by RokkDog

User metadata
Rank Newbie
Rank
Newbie

Hello to all.

I have read tons of posts about dos and dosbox but can't find the answer to my problem.

The scenario is that I have a dos based WarCraft 2 game that i want to make portable. I have other games that i have been able to make to start from anywhere from just double click the bat file i have made to execute game in dosbox. However WarCraft 2 performs a cd check so i have to have iso file of the game mounted. That's not a problem, i just changed the game file to image file in my bat and it loads the cd to dosbox. HOWEVER, after this i have to always type WAR2 to be able to play the game. My problem is that i want dosbox to automaticly start the game exe after it has mounted the c and d drive. Is this possible in any way? Can you tell dosbox to start exe automatically when it is started. Autoexecute is not an option, the bat file runs after it and the same variables can not be used in dosbox itself.

So once more to make it a bit clearer.

I have a bat file that opens iso file in dosbox (all files are in the same folder)>
Dosbox automatically mounts current folder as c: and the iso file to d: (no matter where my folder is and i like that a lot)

NOW THE PROBLEM

How to make the Dosbox automatically start the game after above?

Reply 1 of 18, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

In autoexec section of the .conf file place the commands that you want dosbox to perform.

c:
cd war2
war2.exe
exit

How To Ask Questions The Smart Way
Make your games work offline

Reply 2 of 18, by RokkDog

User metadata
Rank Newbie
Rank
Newbie

The autoexec run first, so there is not yet a mounted c: drive in dosbox cause my bat file makes dosbox to mount those based on variables :\ Is there anyway you can make the autoexec wait the bat file? Result autoexec gives is that "there is no c: drive mounted" and after that my bat file hits and makes the automounts. If anybody gets what I am talking here 😁 I put a screenshots in a minute.

Reply 4 of 18, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Well, you can include the mount command in the conf file, before trying to switch to the C drive.

All hail the Great Capacitor Brand Finder

Reply 6 of 18, by RokkDog

User metadata
Rank Newbie
Rank
Newbie

15z0ffd.jpg
as you see, when i moved the folder to my desktop, i can still use my bat file to mount the location that I'm at the moment, (different drive letter, different path),but how to make the config file do the same? Without the full path?

Reply 8 of 18, by RokkDog

User metadata
Rank Newbie
Rank
Newbie

No. This post didn't help at all. There is nothing about relative filepaths or anything making the config file to follow where my files are. I do not want to edit autoexec if my drive letter or path changes. Just posting beginner guide doesn't help. I need commands that loads the certain files from specific directory wherever the directory is. Is it in C: drive E: drive or somewhere else. Does anybody even want to understand 😁

Reply 9 of 18, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Put the mountings in conf files of the game folder and load them with the command. I think dosbox understands basic relative paths (.\ or .. Etc).

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 11 of 18, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

There are varios ways you could do what you want to do:
1: use the -conf and -userconf command line switches. The userconf stacks up, so you can have general autoexec section that is true for all games (for example "mount c .\dosgames") and additional stuff in the autoexec section of the userconf (you can have an empty conf with just the [autoexec] section - or just parts of the other sections you want to override).
2. use just one conf to mount the top folder of your games (again for example "mount c .\dosgames") and batch filesin that folder that have all aditional commands (c:, cd game, imgmount bla/game.iso, game exe). And launch that batch.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 12 of 18, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

You might not be able to do it the way you want but if you think differently the outcome can be the same 😉

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 13 of 18, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

If Dosbox doesn't understand paths in the way you require, you can use a batch file to assemble the configuration from stubs. Hopefully that will offer the flexibility you require.
http://stackoverflow.com/questions/4419868/wh … in-a-batch-file
http://ss64.com/nt/syntax-redirection.html

All hail the Great Capacitor Brand Finder

Reply 14 of 18, by RokkDog

User metadata
Rank Newbie
Rank
Newbie
Dominus wrote:

There are varios ways you could do what you want to do:
1: use the -conf and -userconf command line switches. The userconf stacks up, so you can have general autoexec section that is true for all games (for example "mount c .\dosgames") and additional stuff in the autoexec section of the userconf (you can have an empty conf with just the [autoexec] section - or just parts of the other sections you want to override).
2. use just one conf to mount the top folder of your games (again for example "mount c .\dosgames") and batch filesin that folder that have all aditional commands (c:, cd game, imgmount bla/game.iso, game exe). And launch that batch.

So where do I put the commands?
It doesn't work in end of the dosbox.conf file, so do I have to generate some kind of new file that dosbox listens or how it is done?
I have little to none experience in DOS so simplest things can be tricky. Can you give some example how to get mount c.\dosgames to work.
I already know that .\ means the current directory, but how to get it work?
My setup is that i have a WarCraft2 folder that contains the game files and the dosbox portable in the folders "root"
dosbox.conf file exist in the path WarCraft2\Data\Settings\dosbox.conf does that have to do anything why I can't get the .\ working or is the problem somewhere else?

Reply 15 of 18, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Put the conf in the Warcraft2 folder and it may work (mount c .\ or maybe ./)

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 16 of 18, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Or/and set the working folder in whatever bat or cmd you use to launch Dosbox. The mount c .\ might be relative to the dosbox.conf file OR the working folder. I'm no longer on Windows so I can't test that stuff.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 17 of 18, by collector

User metadata
Rank l33t
Rank
l33t

Open Notepad and put the following in it:

[autoexec]
mount c .
imgmount d .\war2tod.iso -fs iso
c:
cd \
WAR2
exit

and save it as dosbox.conf in the game's folder.

Add another txt file to the game's folder and add:

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

and save it as WarCraft2.bat or whatver name you want. You can drag a shortcut from this batch file to wherever you want. You should be able to start the game simply by double clicking your shortcut if the game is already configured. You can change the name and icon of the shortcut to whatever you want.

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

Reply 18 of 18, by RokkDog

User metadata
Rank Newbie
Rank
Newbie

OK guys, i have figured out what have been the problem. I use DosBoxPortable that uses config directory of .\data\settings\dosbox.conf
however the local directory (like command: mount c .\war) is .\app\DosBox\war so now that i figured out where the things have to be to take effect all the commands started to work. So for atleast now the problem is solved, I get back to you guys when I encounter new troubles... or (if evrything goes as planned) I post my single click portable dos creation:D