Shortcut to Launch DOSBox Staging in a Working Directory, with a Stream Deck
Over the years I’ve used various iterations of DOSBox to play old games and even run Windows 3.1. My current preferred “flavor” of DOSBox is DOSBox Staging. It has a wonderful CRT shader solution that “just works,” and it is cross-platform so I can run it on my MacBook and my desktop PC.
The Getting Started guide for DOSBox Staging provides instructions for creating an icon to Start DOSBox Staging in macOS, but for Windows it recommends browsing to the folder where the game(s) or other DOS programs(s) are located, then right-clicking in that folder and choosing “Open with DOSBox Staging.” That is a little bit tedious, and in Windows 11 is even more annoying because the option to Open with… is hidden by default behind a second context menu when you right-click. The guide also provides instructions for creating per-game batch files and creating shortcuts to them, but I wanted to have a shortcut on my Windows desktop that would launch DOSBox Staging with the proper working directory–no file browsing or batch file needed.


Creating the Shortcut
The shortcut can be created relatively easily. Right-click on your Windows desktop (or wherever you want to create the shortcut), select New > Shortcut, then browse to the dosbox.exe file. This is probably in C:\Users\yourusername\AppData\Local\Programs\DOSBox Staging\dosbox.exe depending on your DOSBox Staging installation.

Before clicking the Next button to save the shortcut, add --working-dir PATH_TO_YOUR_DOSBOX_STAGING_FOLDER after the end quote. This is the folder where you set up your game/program per the DOSBox Staging instructions. Rather than create separate folder structures for each game/program, I prefer to have a single DOS “environment” that I launch into and then install and run games/programs the old fashioned way using the command prompt. It makes the experience feel more authentic to me. I have my DOS content in a subfolder on a second hard drive, so my shortcut is "C:\Users\joshm\AppData\Local\Programs\DOSBox Staging\dosbox.exe" --working-dir D:\Emulators\DOSBoxStaging\DOS.

I should also mention that the Linux instructions on the DOSBox Staging site discuss using --working-dir to create a shell command or shortcut, but the Windows instructions do not, so I wanted to make a record of it here as a valid option for Windows.
Create a Stream Deck Button for DOSBox Staging
With this shortcut, I was able to create a button on my Stream Deck that will launch DOSBox Staging using the correct folder. Use the System > Open Action, and for the App/File, enter the same shortcut. Done!

Also, Syncing DOS Across Platforms
I like the option to play older games using DOSBox on my desktop PC and also on the go on my MacBook Pro. With a file syncing solution like Dropbox (or more recently for me Synology Drive running on my Synology NAS), I can play a game on one computer, save and quit, then the next time I play I can pick it up on the other computer (assuming everything is connected and syncing properly). I have been doing this successfully for many years, so far no issues.