Celeb Glow
updates | March 08, 2026

How to open UNC path containg spaces in run dialog box

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

5

3 Answers

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)

3

Using:

file:////itserver\files\IT Programs\Example Program\program.exe

it worked! I have no idea what's going on, or why when using double quotes it produced an error message...

To run a file from a network share, you need to put a double slash before the server name or IP, not a single slash.

After you have done that, put quotes around the path.

Example:

"\\server\share\folder name\MyApp.exe"

instead of

"\server\share\folder name\MyApp.exe"

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy