View Single Post
Old 18-08-2012, 11:06 PM   #1
The Fifth Horseman
FUTURE SCIENCE BASTARD
 
The Fifth Horseman's Avatar


 
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
Lightbulb Taking non-frontend DOSBox profiles a bit further

DISCLAIMER:
This tutorial works on Windows XP - any version (may require administrator permissions).
On windows Vista and 7, the dialogs used in this tutorial have been removed (to "streamline user experience", apparently ), although there are a few workarounds and third party tools you can use to get them back: [1] [2] [3]


The idea has been explained since a while, and Japo put it into a more practical form in his tutorial (if you have not done so yet, read it - I will not repeat things he already explained).

Well, a few months ago I had to reformat and finally realised that while this solution still works as advertised... it's also a pain to manually set the config file for each shortcut (which really doesn't scale well when you want to set up a large library of games in this fashion), not very portable, and a nightmare to upgrade.

And then I realised we were doing it wrong the entire time.

And that it's more convenient and faster (if not neccessarily stronger) than the old one?

First thing to do is go into the Folder Options of our darling friend Windows Explorer. You can do it from any Explorer window or from the Control Panel and open the File Types tab (might be called File Associations in English).





Click new and you will be presented with this prompt:


Enter conf and confirm.
Now find the new file type in the list, click it and then click "Advanced".



You can set the description and icon to anything you like - it's not important here.
We need to add two actions for files with the conf extension: one to edit them and one to run then (you'll get it in a moment)

Click on add and fill in the action name as open . As the application, you will set the same file and parameters as in Japo's tutorial, with one difference: instead of a name of a config file, you will use %1


(Correction: the application field should be "C:\Program Files\DOSBox-0.73\dosbox.exe" -noconsole -conf "%1" )



After adding the action, select it in the list and click on set default.

Now let's add an edit action and we're done.

Click on add and fill in the action name as edit . As the application, you will set Notepad , followed by %1 .
In Windows XP, the Notepad is located in %SystemRoot%\system32\notepad.exe (the example uses an absolute path), on Vista and 7 you may need to find it manually.




Okay, so what have we achieved now?
Double-clicking a .conf file will run DOSBox with that .conf as the incremental config
Right-clicking a .conf file, you will see an Edit option in the context menu that will open the .conf using Notepad for editing.

Benefits:
You don't have to manually set a config file for each shortcut.
It's much more portable from system to system
It's easily upgradable - you change the associated DOSBox version in one location only.
Custom shortcuts are no longer neccesary unless you want to give your DOSBox profiles custom icons.

Drawbacks and workarounds:
If you associated Notepad with the .conf files before, you are used to editing then by double-clicking.
You can easily edit them by right-clicking and choosing edit instead. It's just a matter of getting used to the change.
It's not possible to set DOSBox version used on a per-shortcut basis.
You can create additional file associations for slightly different extensions and using a part of extension to determine which DOSBox version to use with that config ( eg: a .071_conf extension associated with 0.71 and so on - remember that the extension cannot contain a period mark )


Well, that's it for me. If you manage to achieve the same on Windows 7 or Vista, let others know what steps in this tutorial had to be changed.

PS. I know the draft version of the old tutorial is down, trying to find a copy in my archives
__________________

"God. Can't you people see I'm trying to commit a crime against science and nature here?"
-- Reed Richards

Last edited by The Fifth Horseman; 19-08-2012 at 06:07 PM.
The Fifth Horseman is offline                         Send a private message to The Fifth Horseman
Reply With Quote