View Full Version : BAT file for DosBox 0.73?
Hello, mates,:hihihi:
I do play UW2 using DosBox0.73. Nice.
But when I click for example Daggerfall icon (with DosBox also) the game started immediately. Very nice! No need of mount c c:\games etc.
So, lazy yoga want to create a Bat file,
for example dosraider.bat file and used this file to start the game UW2.
But my DosBox start window shows not C:\ , but Z:\.
Moreover, I dunno how to create Bat file?
Is this correct?
C:\copy con dosraider.bat - Enter
C:\mount c c:\games - Enter
Z:\c: - Enter
C:\>cd games - Enter
C:\games>cd UW2 - Enter
C:\games\UW2>UW2 - Enter
Here I do not know the last command to finish the Bat file. Rats!!
Was some like Control+* ??
Q: In what directory has to placed above mentioned bat file? In \UW2 ?
For me it is old stuff and I do not enter the swamp..Nicht wahr, Dosraider?
:whistling:
yoga
UW2 is stored in C:\games\UW2
The executable file is named UW2.exe
Forget about "copy con" and Ctrl+Z, and "cd games" is incorrect because you already mount real c:\games as virtual c:. And using a .bat file is a bad idea, you can't access it if it's in a directory that isn't mounted yet because it's supposed to be mounted by the .bat itself.
You have to put the commands in the [autoexec] section of a DOSBox configuration file, and then specify that file in the Windows shortcut that you use to start the game.
http://www.abandonia.com/vbullet/showthread.php?t=17500
The correct commands would be:
mount c c:\games
c:
You probably want those two in the general configuration file, that's parsed for every game, if all your games are in c:\games. Then in the config file specific for UW2:
cd \UW2
call UW2
exit
dosraider
28-11-2010, 01:28 PM
Basicly what Jampo said.
A bit more detailled:
Yoga, if you want to write batch files use or notepad, or you can use MsDos edit directly in dosbox.
Another nice nice one is the Freedos edit clone, works perfect in dosbox and adds some nice extras.
http://www.freedos.org/software/?prog=edit
As Japo said, you can only run a batch in dosbox if dosbox can read the batch file.
Means that:
-> your virtual C must be mounted
-> the batch file must be stored in your virtual C root.
Specific for you:
Automount your virtual C in dosbox's [autoexec]
If you want to run UW2 from a simple batch file it should be named something as: UW2RUN.BAT
In that batch:
cd uw2
uw2
Windows path: c:\games\uw2run.bat
To run your game, run dosbox and input uw2run.
Japo's 'call' and 'exit' line are optional, but they won't hurt.
For good understanding, that batch of mine is based on your info, and needs a fresh dosbox start.
It won't work if your dosbox prompt is on "c:\something\whatever\>" as it doesn't switch back to root first nor allows hot dir switching.
You can of course add extra command lines so that it always will work whatever your dosbox prompt is on, up to you.
If it's worth the hassle, I doubt it.
I only use batch files to run games when they need CD imgmounts or game specific dosbox settings.
For a game that runs straight from the prompt without additional params it's not worth to write a batch, personal opinion, of course.
Japo's 'call' and 'exit' line are optional, but they won't hurt.
"call" makes no difference unless the executable (UW2 in this case) were a .bat file. In that case, removing "call" would case the "exit" line not to be reached. In DOS and Windows, when a .bat (or .cmd) script calls another one, unless it's with "call", the first one aborts at that point, the execution isn't stacked and doesn't return to the following line when the second .bat script ends. DOSBox's autoexec works in this same way.
dosraider
28-11-2010, 03:07 PM
Yes, but why the 'exit'?
If eventually error messages you will miss them.
Ah well, each his own.
I figured most people that want the game to be started by a Windows shortcut, would prefer not seeing the command line altogether. Actually I do not use it myself, in case I exit the game to start again loading an old game, etc.
Hi,
I carefully read your advices and TY once again.
After some exercises I realized that my knowledge
is not enough to finish the task.
So, I will use good old way to start this game.
:whistling:
dosraider
29-11-2010, 12:24 PM
:mhh:
Nothing wrong with that.
However, you should at least automount your virtual C: ,means that dosbox starts with a C: ready when launched.
Open dosbox conf file
start menu -> dosbox 0.74 -> options -> dosbox 0.74 options
Will open notepad, scroll down to [autoexec] and add your virtual C: mount.
Going by your info it should be something as:
[autoexec]
mount c c:\games
c:
Save on exit.
Can't be thàt hard to do, is it?
If you run some games by drag/drop you always can have an extra 'drag drop' shortcut on your desktop without 'automount'.
Anyway, that's what I do, as you can see here:
:blush:
http://img221.imageshack.us/img221/4460/deshtop.th.png (http://img221.imageshack.us/i/deshtop.png/)
XP desktop.
:ph34r:
Have 5 other PCs, but they all look the same.
:blush:
:whistling:
As for batch files, it's much easier than you seem to think, most of the MsDos batch commands will work with dosbox, only for some you'll need extra (extern) programs, xcopy32 to name one.
Give it a shot, it ain't voodoo.
:mhh:
Nothing wrong with that.
However, you should at least automount your virtual C: ,means that dosbox starts with a C: ready when launched.
Open dosbox conf file
start menu -> dosbox 0.74 -> options -> dosbox 0.74 options
Will open notepad, scroll down to [autoexec] and add your virtual C: mount.
Going by your info it should be something as:
[autoexec]
mount c c:\games
c:
Save on exit.
Can't be thàt hard to do, is it?
If you run some games by drag/drop you always can have an extra 'drag drop' shortcut on your desktop without 'automount'.
Anyway, that's what I do, as you can see here:
As for batch files, it's much easier than you seem to think, most of the MsDos batch commands will work with dosbox, only for some you'll need extra (extern) programs, xcopy32 to name one.
Give it a shot, it ain't voodoo.
Gnadige Dosraider,
I am not novice in DOS.
And yr idea to do these changes at another PC is best.
I had 4 PC, but I gave one as present for poor family.
Later I will report.
Danke sehr!
:whistling:
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.