Windows – How to open UNC path containg spaces in run dialog box

run-dialoguncwindowswindows 7

I've got a network location which contains several folders with spaces in them and want to be able to start a program by using Run and the program's UNC path. For example: open the run dialog box, put in \\itserver\files\IT Programs\Example Program\program.exe and program.exe starts. I'm fairly certain that the problem is related to the spaces in the name because I can confirm that it is neither a connectivity issue, nor a permissions one.

I have tried:

"\\itserver\files\IT Programs\Example Program\program.exe"

'\\itserver\files\IT Programs\Example Program\program.exe'

\\itserver\files\"IT Programs"\"Example Program"\program.exe

"\\itserver\files\'IT Programs'\'Example Program'\program.exe"

<\\itserver\files\IT Programs\Example Program\program.exe>

\\itserver\files\IT%20Programs\Example%20Program\program.exe

Also, renaming the folders is not an option.

EDIT:
I fixed the error in which only one of the slashes showed originally in the file path by adding a third slash as well as clarified what I tried

Best Answer

The correct solution is to use double quotes like so:

"\\itserver\files\IT Programs\Example Program\program.exe"

This should work for windows bases systems going back from XP to 8.1 (and possibly older - I don't have kit to test on)

Also, please note that you need a double slash before a server name:

\\server\share\folder\subfolder\file.exe

"\\" indicates a server

"\" indicates an object on the server (share, folder, file etc)

Related Question