Windows XP Batch File – Use START with Program Names Containing Spaces

batchwindowswindows xp

I'm currently working on a batch file in a Windows XP virtual machine to run two programs at once. Specifically an old game and the on-screen keyboard (because I can't use a keyboard remotely while playing the game since it's fullscreen. I can use one at home, but what if I'm away?).
My batch file is as follows:

@echo off
cd "C:\Program Files\The Puzzle Collection\code"
start puzzle pack.exe
cd "%SystemRoot%\system32"
start osk.exe
exit

But because puzzle pack.exe has spaces, it can't be opened when I run the batch. I've tried other methods but they either didn't work or opened a command prompt window.
How can I get Windows to recognize the program and open it?

Best Answer

Ok, after some fiddling with the file and some googling, I found a guide that said that you had to include the executable AND the program path (in quotes of course) So I managed to fix the batch myself with this

start "puzzle pack.exe" "C:\Program Files\The Puzzle Collection\code\puzzle pack.exe"

Lo and behold, it worked!

Related Question