Page 1 of 1

Run and UNC paths on Windows

Posted: Sun Apr 14, 2024 4:56 pm
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.

Re: Run and UNC paths on Windows

Posted: Sun Apr 21, 2024 11:52 am
by airsoftsoftwair
Yes, this looks like a bug. Will be fixed.

Re: Run and UNC paths on Windows

Posted: Tue Jul 23, 2024 11:05 pm
by airsoftsoftwair

Code: Select all

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