28-11-2010, 11:10 AM | #1 | ||
Join Date: Oct 2006
Location: Asenovgrad, Bulgaria
Posts: 2,532
|
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 |
||
|
|
28-11-2010, 11:48 AM | #2 | ||
Join Date: Mar 2006
Location: ,
Posts: 4,613
|
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: 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. |
||
|
|
28-11-2010, 01:28 PM | #3 | ||
Join Date: Aug 2007
Location: Dixmuide, Belgium
Posts: 2,767
|
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* |
||
|
|
28-11-2010, 02:54 PM | #4 | ||
Join Date: Mar 2006
Location: ,
Posts: 4,613
|
"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... |
||
|
|
28-11-2010, 03:07 PM | #5 | ||
Join Date: Aug 2007
Location: Dixmuide, Belgium
Posts: 2,767
|
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* |
||
|
|
28-11-2010, 09:00 PM | #6 | ||
Join Date: Mar 2006
Location: ,
Posts: 4,613
|
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... |
||
|
|
29-11-2010, 11:21 AM | #7 | ||
Join Date: Oct 2006
Location: Asenovgrad, Bulgaria
Posts: 2,532
|
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. |
||
|
|
29-11-2010, 12:24 PM | #8 | ||
Join Date: Aug 2007
Location: Dixmuide, Belgium
Posts: 2,767
|
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.
__________________
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* |
||
|
|
30-11-2010, 02:39 PM | #9 | ||
Join Date: Oct 2006
Location: Asenovgrad, Bulgaria
Posts: 2,532
|
Quote:
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! |
||
|
|
|
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 |
|
|
||
  |