VOGONS

Common searches


First post, by Midgard Dragon

User metadata

Okay, I'll try to explain my question as best as I know how. When I play a game using DOSBox, I use the drag/drop method to mount the drive (I *think* that's the proper terminology.) So, for example, if I play Ultima Underworld 2 I open a folder containing the dosbox.exe and a separate folder containing the UW2.exe I then drag UW2.exe on top of dosbox.exe and the game begins (sometimes after some tweaking with the frame skip and stuff.)

What I'm wonder is, is there a way to skip the mounting step. Basically, what I'd like is a way to create a shortcut that all I need to do is double-click that will mount the drive/game into DOSBox and start things up. I read the documentation and understand it's possible to automatically mount a specific folder by editing something or other, but I would like to be able to skip as many steps as possible, so I thought I'd just pose this question. I dont' really wanna CD to each specific game I need everytime I wanna play a different game. I know, I'm lazy lazy lazy, but the fun of Windows is being able to be lazy like that. ^^

Just wondering if this is possible or could be a possible feature in the future.

Thanks,

Midgard Dragon

Reply 1 of 17, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Young Paddawan - you need to learn about the Force of the Command Line:

  1. Create a CMD-file with Notepad.
  2. Insert the commands to launch DOSBox, e.g.
    @ echo off

    cd /d "X:\Path\To\UW2"

    "%ProgramFiles%\DOSBox-0.63\dosbox.exe" -c "mount C ." -c "C:" -c "UW2.exe"
  3. Create a short-cut to your command file.
  4. Double-click the short-cut.

PS: You should also learn to read the ReadMe. It is all explained in there.

Edit: Fixed a typo in the example code (thanks HunterZ)

Last edited by MiniMax on 2005-04-18, 18:05. Edited 2 times in total.

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 3 of 17, by Midgard Dragon

User metadata

Okay, didn't work, for the record, here's the different ways I tried it. I'll post these up here and then go check out the readme in case that will solve my problem.

@ echo off

cd /d "X:\Program Files\Ultima Underworld 2 - Labyrinth of Worlds"

"%ProgramFiles%\DOSBox-0.63\dosbox.exe" -c "mount C ." -c C:" -c "UW2.exe"

@ echo off

cd /d "C:\Program Files\Ultima Underworld 2 - Labyrinth of Worlds"

"%ProgramFiles%\DOSBox-0.63\dosbox.exe" -c "mount C ." -c C:" -c "UW2.exe"

@ echo off

cd /d "X:\Path\To\UW2"

"%ProgramFiles%\DOSBox-0.63\dosbox.exe" -c "mount C ." -c C:" -c "UW2.exe"

That last one being the original copy/paste, of course. I also tried various things like removing all the quotation marks and changing that /d to a /c

*goes to look at the readme*[/quote]

Reply 5 of 17, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Be sure to post the exact error messages you get.

I've found a few issues with what MiniMax said that are probably confusing you:
- The file should be a .bat file
- You'll need to make sure that the CD command is changing to the directory (folder) your game is in - only you know what that is since you didn't bother to tell us
- If your game isn't on your C: drive then you'll have to insert a command before the CD line to change to that drive letter too
- The last line assumes you're using DOSBox 0.63, installed to the default location. If that's not the case on your system, then you'll need to account for it.

You should never, EVER launch DOSBox by dragging stuff onto it. In fact, the devs really ought to take that ability out of the Windows port because it just confuses the hell out of everyone.

Here's the way I use DOSBox:
- I have all my old games in subfolders of D:\oldgames
- I have DOSBox installed to D:\oldgames\dosbox
- I put the following in the autoexec section of my dosbox.conf (in my dosbox directory):

[autoexec]
# Lines in this section will be run at startup.
mount c d:\oldgames
c:

- I run DOSBox by double-clicking dosbox.exe, which puts me at a virtual DOS prompt. Because of the stuff I put in my dosbox.conf, it also mounts d:\oldgames as my virtual C: drive and then changes to it, so I get a "C:>" prompt
- I then CD inside of DOSBox to the folder for the game I want to play and then run that game. Just like the old days!

Reply 6 of 17, by Midgard Dragon

User metadata

1) I did tell you where my game was located, it was just buried within one of the quotes:

C:\Program Files\Ultima Underworld 2 - Labyrinth of Worlds

2) I've never EVER 😉 had a problem with dragging/dropping to DOSBox.

It looks like DOSBox is actually installed to C:\Program Files\DOSBox-0.61 so it does appear to be the default directory. It does not, however, seem to be .63, so I guess instead of just accounting for that I'll update to .63.

The reason I don't want to use your method of CDing to a single directory where all my old games is stored is two-fold. One, I don't want to bother with CDing (told ya I was being super-lazy 😉 ), and two, I don't want all my old games in a single directory, unless I use that single directory is "C:" or "C:\Program Files". As in: C:\Ultima Underworld or C:\Program Files\Ultima Underworld

All of this is really just me being simulatenously picky and lazy, but there seems to be a way to do it, so I'll keep trying.

I'm still curious about what's wrong with dragging/dropping? It's a method that is pointed out in the readme, I've never had it break anything or cause any problems, and it's the most convenient way (IMO) outside of the method I'm trying to work on getting working.

Reply 7 of 17, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

1) I did tell you where my game was located, it was just buried within one of the quotes:

Ah, I see. I also just learned that the /d parameter to cd will handle the case where you would need to change the active drive letter, but it doesn't matter in your case. I also just learned that in Windows XP, CMD files work the same as BAT files (maybe even better?), so what MiniMax said to do should work - of course that's after you either install DOSBox to the 0.63 directory that MiniMax assumed, or change the BAT/CMD file to point to the 0.61 directory that you had it installed to.

Let us know whether you get it working or not, and if it doesn't work, be sure to let us know the exact error(s) that you're seeing.

Maybe dragging and dropping isn't as terrible as my gut reaction to it tells me it is, but you'll never get me to do it! 😜

If I wanted to set up what you're describing, I'd do it like this:
Make a custom dosbox.conf (maybe called uw2.conf) in your DOSBox folder, and put the following commands in the [autoexec] section:

[autoexec]
# Lines in this section will be run at startup.
mount c "C:\Program Files\Ultima Underworld 2 - Labyrinth of Worlds"
c:
uw2.exe

You could then make a normal Windows shortcut to dosbox.exe, but change the Target line in the shortcut properties to something like:
C:\Program Files\DOSBox-0.63\dosbox.exe -conf uw2.conf

This will make that shortcut launch DOSBox with that custom .conf file, which will automatically load the game for you.

The cool thing about this method is that you can totally optimize DOSBox's behavior for that specific game by tweaking the uw2.conf file that you created. That way, you won't have to mess much with cycles and whatnot after starting the game.

Reply 8 of 17, by Guest

User metadata

Okay, I've got it to the "almost but not quite" stage. I changed the .63 to a .61 until I can update DOSBox. Before that it was only immediately crashing back out to Windows. Now, it acts like it normally does on startup, but instead of starting the game, I receive a few error messages:

In the cmd window: The file name, directory name, or volume label syntax is incorrect.

In the DOSBox window: Illegal command: C:".

and

Illegal command: UW2.exe

Reply 10 of 17, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Crazy people with your batch files....this is why frontends were created. Anyways....

Right-click My Computer
Go to Properties
Advanced
Environmental Variables
Scroll down to PATH
Add ;C:\Progra~1\DosBox-0.XX (Whatever your ver is)

Now you can execute DosBox from wherever you want to.

Now create your batch files wherever you wish to place them.

Your batch file

UW2.bat

DosBox.exe C:\progra~1\UW2\UW2.exe

Might I suggest using shorter filenames? Preferabbly DOS compatible 8.3? Windows has 8.3 support but sometimes it can be flaky.

Last edited by DosFreak on 2005-04-18, 04:52. Edited 1 time in total.

Reply 12 of 17, by Midgard Dragon

User metadata
Rank Newbie
Rank
Newbie

I nominate you for God. :x

Seriously, though, while I only understood 95% of what you said, I followed instructions and it worked like a charm. Also shortened the UW2 directory to UW2. Not sure if that had an effect, but it worked so I'm leaving it that way.

Thanks again.

Midgard Dragon
-==UDIC==-

Reply 13 of 17, by Midgard Dragon

User metadata
Rank Newbie
Rank
Newbie

Last was a reply to DosFreak btw. The rest of you were very helpful as well and I'm sure your methods would have worked fine once I got them completely right. Thanks to everyone.

Midgard Dragon
-==UDIC==-

Reply 14 of 17, by MidgardDragon

User metadata

DOSFreak (or anyone else who understands how he said to do this):

Is it possible to create a new batch file for a game that requires me to mount the CD drive before playing, and still keep my frontend in tact, or do I need to edit that as well?

What I need to do is:

mount c c:\ mount d c:\ -t cdrom C: cd HEROES heroes.exe […]
Show full quote

mount c c:\
mount d c:\ -t cdrom
C:
cd HEROES
heroes.exe

in a batch file.

And still keep the frontend that allows me to create such simple batchfiles as this:

DosBox.exe C:\progra~1\UW\UW.exe

Reply 15 of 17, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

What you need to do is create HEROES.BAT in directory C:\where\ever\some\where:

mount c c:\ mount d c:\ -t cdrom C: cd HEROES heroes.exe […]
Show full quote

mount c c:\
mount d c:\ -t cdrom
C:
cd HEROES
heroes.exe

and launch DOSBox with

cd "C:\where\ever\some\where"
DosBox.exe -c "mount Y ." -c "Y:HEROES.BAT"

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