Associating the Configuration File in Windows

From DOSBoxWiki
Jump to navigationJump to search

Overview

Associating your configuration files with DosBox.exe in Windows isn't too terribly difficult. I'd recommend that you use a file extension that is more specific than ".conf" so you don't run the risk of trampling any other file types. I've chosen ".dosbox".

By passing the right arguments and adding a few verbs you can right click on the ".dosbox" files to get some useful commands such as "Run FullScreen". I've done this below- it shouldn't be too hard to think of how you can tweak this for your own use.

Setting the perceived type gets you default behavior for text files. What this means is you'll get the edit verb automatically and it will open your default editor.

You can make these changes manually to the registry or put all of the following lines in a file with the extension of ".reg". If you double click on said file it will put the entries into the registry for you.

Important- make sure the path to your DosBox exe is correct. Also, if you want to associate ".conf" instead of ".dosbox" simply change the only reference to ".dosbox". ([HKEY_CLASSES_ROOT\.conf])

Registry Entries

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.dosbox]
@="DosBox"
"PerceivedType"="text"

[HKEY_CLASSES_ROOT\DosBox]
@="DosBox Emulator"

[HKEY_CLASSES_ROOT\DosBox\DefaultIcon]
@="M:\\Emulation\\PC\\DosBox\\dosbox.exe,0"

[HKEY_CLASSES_ROOT\DosBox\shell]

[HKEY_CLASSES_ROOT\DosBox\shell\open]

[HKEY_CLASSES_ROOT\DosBox\shell\open\command]
@="\"M:\\Emulation\\PC\\DosBox\\DosBox.exe\" -conf \"%1\""

[HKEY_CLASSES_ROOT\DosBox\shell\run]
@="Run"

[HKEY_CLASSES_ROOT\DosBox\shell\run\command]
@="\"M:\\Emulation\\PC\\DosBox\\DosBox.exe\" -conf \"%1\""

[HKEY_CLASSES_ROOT\DosBox\shell\runfull]
@="Run FullScreen"

[HKEY_CLASSES_ROOT\DosBox\shell\runfull\command]
@="\"M:\\Emulation\\PC\\DosBox\\DosBox.exe\" -fullscreen -conf \"%1\""