Go Back   Forums > Community Chatterbox > Tech Corner
Memberlist Forum Rules Today's Posts
Search Forums:
Click here to use Advanced Search

Reply
 
Thread Tools Display Modes
Old 28-11-2010, 11:10 AM   #1
yoga
10 GOSUB Abandonia
20 GOTO 10
 
yoga's Avatar

 
Join Date: Oct 2006
Location: Asenovgrad, Bulgaria
Posts: 2,532
Talking BAT file for DosBox 0.73?

Hello, mates,

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?


yoga

UW2 is stored in C:\games\UW2
The executable file is named UW2.exe

Last edited by yoga; 28-11-2010 at 11:19 AM. Reason: forget these old Dos commands
yoga is offline                         Send a private message to yoga
Reply With Quote
Old 28-11-2010, 11:48 AM   #2
Japo
Autonomous human
 
Japo's Avatar


 
Join Date: Mar 2006
Location: ,
Posts: 4,613
Default

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:

Code:
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:
Code:
cd \UW2
call UW2
exit
__________________
Life starts every day anew. Prospects not so good...

Last edited by Japo; 28-11-2010 at 11:52 AM.
Japo is offline                         Send a private message to Japo
Reply With Quote
Old 28-11-2010, 01:28 PM   #3
dosraider
Dismembered.
 
dosraider's Avatar

 
Join Date: Aug 2007
Location: Dixmuide, Belgium
Posts: 2,767
Default

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.
__________________

Not a member of The Victorious People's Shoutbox Liberation Army.
Not a member of the GAG Guerrilla. Don't get A Grip!
FOR RENT
*Advertising space*
dosraider is offline                         Send a private message to dosraider
Reply With Quote
Old 28-11-2010, 02:54 PM   #4
Japo
Autonomous human
 
Japo's Avatar


 
Join Date: Mar 2006
Location: ,
Posts: 4,613
Default

Quote:
Originally Posted by dosraider View Post
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.
__________________
Life starts every day anew. Prospects not so good...
Japo is offline                         Send a private message to Japo
Reply With Quote
Old 28-11-2010, 03:07 PM   #5
dosraider
Dismembered.
 
dosraider's Avatar

 
Join Date: Aug 2007
Location: Dixmuide, Belgium
Posts: 2,767
Default

Yes, but why the 'exit'?
If eventually error messages you will miss them.

Ah well, each his own.
__________________

Not a member of The Victorious People's Shoutbox Liberation Army.
Not a member of the GAG Guerrilla. Don't get A Grip!
FOR RENT
*Advertising space*
dosraider is offline                         Send a private message to dosraider
Reply With Quote
Old 28-11-2010, 09:00 PM   #6
Japo
Autonomous human
 
Japo's Avatar


 
Join Date: Mar 2006
Location: ,
Posts: 4,613
Default

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.
__________________
Life starts every day anew. Prospects not so good...
Japo is offline                         Send a private message to Japo
Reply With Quote
Old 29-11-2010, 11:21 AM   #7
yoga
10 GOSUB Abandonia
20 GOTO 10
 
yoga's Avatar

 
Join Date: Oct 2006
Location: Asenovgrad, Bulgaria
Posts: 2,532
Talking Merci, amigos. YOU very kind.

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.

yoga is offline                         Send a private message to yoga
Reply With Quote
Old 29-11-2010, 12:24 PM   #8
dosraider
Dismembered.
 
dosraider's Avatar

 
Join Date: Aug 2007
Location: Dixmuide, Belgium
Posts: 2,767
Default



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:
Quote:
Originally Posted by dosraider View Post


XP desktop.


Have 5 other PCs, but they all look the same.


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.
__________________

Not a member of The Victorious People's Shoutbox Liberation Army.
Not a member of the GAG Guerrilla. Don't get A Grip!
FOR RENT
*Advertising space*
dosraider is offline                         Send a private message to dosraider
Reply With Quote
Old 30-11-2010, 02:39 PM   #9
yoga
10 GOSUB Abandonia
20 GOTO 10
 
yoga's Avatar

 
Join Date: Oct 2006
Location: Asenovgrad, Bulgaria
Posts: 2,532
Talking

Quote:
Originally Posted by dosraider View Post


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!

yoga is offline                         Send a private message to yoga
Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
.ISO file sgtboat Troubleshooting 3 15-10-2008 10:15 AM
Need Help With Jar File Ioncannon Programming 4 22-03-2007 05:25 AM
Where Is The Exe. File. oyjah Troubleshooting 2 18-06-2006 10:54 PM
Bin But No Cue File? Guest_matt Troubleshooting 8 09-08-2005 08:05 PM
Dosbox Config File J.B. Troubleshooting 12 25-02-2005 12:34 PM


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 05:02 PM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.