I've been writing a small script at work and I wanted to show the user the resulting image created on a network share.

But rather than assume that they all have the network share mapped to the same drive letter I thought it would be easier to use UNC (Universal Naming Convention).

This said it VBS scripting has been around since Windows 2000 but is not so friendly when it comes to UNC.

Finally found a post on the internet that helped, basically when using UNC you need to add Chr (34) before and after the UNC.

Example

Set Shell = CreateObject("WScript.Shell")

Shell.Run """C:\Users\Dave\Desktop\Image with a space in the name.png"""

Shell.Run Chr(34) & "\\SERVER\SHARE\Photos\2015-12-24\151.jpg" & Chr(34)

Shell.Run Chr(34) & "\\SERVER\SHARE\\Photos\5 Dinner\_DSC0417.jpg" & Chr(34)

Hope this little tip helps any other VBS Scriptwriters.