I'm trying to create an installer with WiX that has a step that writes to a network drive via a UNC path, but no matter what I do, I run into the error "Could not access network location":
The network location in question exists and is accessible to the installer process.
Here's what I've tried:
- Specifying the Directory in question via
SetDirectory:
<SetDirectory Action="SetInstallDir" Id="INSTALLFOLDER" Value="\\tsclient\Z\VMSharedFolder\Docs">INSTALLFOLDER=""</SetDirectory>
- Specifying the Directory in question via the command-line:
msiexec /i Wixv3.msi INSTALLFOLDER="\\tsclient\Z\VMSharedFolder"
- Using a Directory that isn't actually used in the installation (
MYPERSONALFOLDERbelow); note I also tried rooting this Directory to the well-known folder one-level up as suggested here:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER" Name="WixV3">
<Component Id="test" Guid="95AB91F2-7DFE-4D1C-8114-BF1D07AD440C" Win64="yes" >
<File Id="test.txt" Source="Files\test.txt" KeyPath="yes" Checksum="no"/>
</Component>
</Directory>
</Directory>
<Directory Id="MYPERSONALFOLDER" Name="WillBeReplaced"/>
</Directory>
<SetDirectory Action="SetInstallDir" Id="MYPERSONALFOLDER" Value="\\tsclient\Z\VMSharedFolder\Docs">MYPERSONALFOLDER=""</SetDirectory>
- Setting
WIXUI_DONTVALIDATEPATHvia the command-line:
msiexec /i Wixv3.msi WIXUI_DONTVALIDATEPATH="1"
- Setting
WIXUI_DONTVALIDATEPATHin XML:
<Property Id="WIXUI_DONTVALIDATEPATH" Value="1" />
- Using a "special" folder that points to the network drive path - in this case,
My Documents. Note that this is the actual production scenario for my application and the reason this came up in the first place - some of our users have theirMy Documentsfolder on a network drive.
<Directory Id="PersonalFolder" Name="UserHomeDocuments"/>
- Upgrading to Wix 5 - I tried some but not all of the above workarounds on Wix 5. For example, the "special folder" solution looks like this:
<StandardDirectory Id="PersonalFolder" />
But none of the above solutions worked; they all fail with the same error message as above. Which leads me to conclude that WiX or MSI installers in general have a problem with UNC paths / network drives in general. This leaves me all the more confused as this seems to be a supported scenario (from searching on the internet).
Could anyone tell me what's actually going on here and what the underlying problem is? As I mention above, I can't avoid the need to write to a network drive as we have a use-case for that.
