Run and UNC paths on Windows

Report any Hollywood bugs here
Post Reply
Flinx
Posts: 255
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Run and UNC paths on Windows

Post by Flinx »

Recently when I wanted to report a bug that wasn't a bug at all I tried CanonizePath() as workaround. I left it in the script, because I assumed that I had with it a solution that would work everywhere.
But when I started the program on Windows from a network path, it didn't work properly. The path is a mapped network path with a drive letter. CanonizePath() apparently turns it into an UNC path. And Run() does not seem to work with UNC paths. If I have interpreted the Windows error dialogs of my tests correctly, then the path in which the Hollywood program is located is placed before the UNC path when it is called.
This is not a big problem for me, but I still wanted to report it.

Here is the (shortened) output of net use:

Code: Select all

>net use
Status       Lokal     Remote                    Netzwerk
-------------------------------------------------------------------------------
OK           N:        \\fritz.nas\fritz.nas     Microsoft Windows Network
The executable to be started is located on this N:.

Code: Select all

SName$="N:\\ExecutableToRun.exe"
NPrint(CanonizePath(SName$))
err= ?Run(CanonizePath(SName$),"")
Started from root on the local volume F:\ I get
"F:\\\fritz.nas\fritz.nas\ExecutableToRun.exe" konnte nicht gefunden werden.

The same script started from N:\
Auf \\fritz.nas\fritz.nas\\\fritz.nas\fritz.nas\ExecutableToRun.exe konnte nicht zugegriffen werden.

I have also tried with other network shares where it is similar.
User avatar
airsoftsoftwair
Posts: 5615
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Run and UNC paths on Windows

Post by airsoftsoftwair »

Yes, this looks like a bug. Will be fixed.
User avatar
airsoftsoftwair
Posts: 5615
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Run and UNC paths on Windows

Post by airsoftsoftwair »

Code: Select all

- Fix [Windows]: UNC paths didn't work with Run() and Execute() 
Post Reply