Run and UNC paths on Windows
Posted: Sun Apr 14, 2024 4:56 pm
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:
The executable to be started is located on this N:.
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.
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 NetworkCode: Select all
SName$="N:\\ExecutableToRun.exe"
NPrint(CanonizePath(SName$))
err= ?Run(CanonizePath(SName$),"")"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.