Network Paths Problem
Hi all,
I have a little problem with my installation script, when the user selects a network path the 'Next' button is disabled.
Is there any way to overcome this problem or is it a bug?
Vytautas
Archive: Network Paths Problem
Network Paths Problem
Hi all,
I have a little problem with my installation script, when the user selects a network path the 'Next' button is disabled.
Is there any way to overcome this problem or is it a bug?
Vytautas
Network path as in UNC (e.g. \\machine\share) or a mapped network drive? It sounds like a bug either way to me.
Sorry, forgot to mention, it is with UNC style paths. I think that NSIS checks to see if the first char in the path is a letter and since it begins with a '\' it rejects it.
Vytautas
Works fine for me. What version of NSIS are using? Are you sure it's not the root directory that the user have choosen?
kichik :up: you are right. The user was selecting the root of a network share and if you select a subdirectory it all works fine.
My next question is how do i allow the user to select the root folder of a network share? I am writing an installer which need to specify a network data share. :(
Edit: I'm using NSIS 2.0b4 (CSV) / 2.0b3
AllowRootDirInstall true
Thanxs Sunjammer, that fixed that problem, however is there an equivalent command to 'AllowRootDirInstall true' that can be used inside a function.
What i would like is to allow users to select root dir for the data folder, but not the main installation folder. For a sample script see this thread.
Vytautas
Not that I'm aware of, but I can see why you'd want that behaviour. How about you use .onVerifyInstDir to manually enforce the check in the second case?
Thanxs Sunjammer, I think the following code should work (I won't be able to check for a few hours, no network @ home).
This code uses a function available in NSIS Archive written by kichik and can be found here
Function .onVerifyInstDir
StrCmp $9 "2" DataPath All
DataPath:
;all valid if UNC
StrCpy $R2 $INSTDIR 2
StrCmp $R2 "\\" PathOK
All:
; Invalid path if root
Push $INSTDIR
call GetRoot
Pop $R1
StrCmp $R1 $INSTDIR "" PathOK
Abort
PathOK:
FunctionEnd