Skip to content
⌘ NSIS Forum Archive

Allow UNC path without last backslash on MUI_PAGE_DIRECTORY

5 posts

vzevako#

Allow UNC path without last backslash on MUI_PAGE_DIRECTORY

Hi,
I found many threads about allowing UNC pathes on MUI_PAGE_DIRECTORY.
But it didn't work for me fully.

I am using AllowRootDirInstall true instruction.

And if I enter path \\server_name\share_name\ it works fine (with last backslash)
If I enter \\server_name\share_name it does not work (without last backslash)

Is there any way to make it working without last backslash?
Please help me.

Thanks for advance.
MSG#
You could use your own path validation function, which just tests both:
vzevako#
I tried use .onVerifyInstDir, but unfortunetly it does not work for me, could someone please show example of script with it?
vzevako#
Also it is impossible to do it using .onVerifyInstDir, because this function is called with UNC pathes only after entering \\server_name\share_name\

This callback function is not called when using \\server_name\share_name

Was verified it by just simple adding MessageBox to this function (message appeared only after entering \\server_name\share_name\)

This function works fine only in case local pathes.
Anders#
MSDN docs for GetDiskFreeSpaceEx: If this parameter is a UNC name, it must include a trailing backslash, for example, "\\MyServer\MyShare\".