1

I have an issue while trying to install to a mapped network drive. I have permissions to create, edit, delete files/folders at this location. It is always for this particular file abc.xslt

This is the what the wix log tell me:

MSI (s) (48:9C) [14:48:11:524]: Source for file 'NSf100' is compressed
InstallFiles: File: abc.xslt,  Directory: M:\abc\def\,  Size: 17819
MSI (s) (48:9C) [14:48:11:525]: Re-applying security from existing file.
Error 1315. Unable to write to the specified folder: M:\abc\def\.
MSI (s) (48:9C) [14:50:33:621]: Product: ABC -- Error 1315. Unable to write to the specified folder: M:\abc\def\.

Then, I tried to do a RemoveFile before installing the new one as follows:

<RemoveFile Id="NSfr100" Name="abc.xslt" On="install"/>

Again, I see this error:

RemoveFiles: File: abc.xslt, Directory: M:\abc\def\
Error 1315. Unable to write to the specified folder: M:\abc\def\.
MSI (s) (9C:3C) [16:54:29:389]: Product: ABC -- Error 1315. Unable to write to the specified folder: M:\abc\def\.

Action ended 16:54:29: InstallFinalize. Return value 3

So, I tried setting permissions on that file as follows but that did not help either,

<util:PermissionEx User="Everyone" Domain="domain name" GenericRead="yes" Delete="yes" Read="yes" GenericAll="yes" GenericWrite="yes" GenericExecute="yes" WriteAttributes="yes" WriteExtendedAttributes="yes" ReadAttributes="yes" ReadExtendedAttributes="yes" ReadPermission="yes" Synchronize="no" />

The same installer works without issues when installing locally. Could someone please help me understand why this fails while installing to a mapped network drive?

Thanks much

1 Answers1

0

This isn't a supported scenario for Windows Installer. The mapped drive only exists in the users logged in context. The windows installer service running as SYSTEM cannot see it.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • Thank you for sharing this information! I went ahead an created a mapped-drive at SYSTEM level by following ForcePush's answer in https://stackoverflow.com/questions/182750/map-a-network-drive-to-be-used-by-a-service. Install, upgrade and uninstall worked fine for this drive. Is this acceptable or do you see any obvious fails with this approach with regards to windows installer ? – user3208131 May 15 '20 at 23:10
  • The problem with mapped drives is that fail and don't always reconnect. Also with different users logged on they have to have it also. Lots of points of failure. Disk is very cheap these days. I'm not sure what benefit you get from installing to a mapped drive considering all the ways this can go south. – Christopher Painter May 16 '20 at 01:13
  • Right, I understand but this is how our users use the product: The client service team accesses their mapped drives remotely and installs the product. That is how it worked with the Wise installer. Now, that same product needs to be upgraded using wix installers. These mapped drives are in the user-context. What beats me is the very first time I run the wix installer on a mapped-drive in the user-context, things work ok (say version 3.1). The next version (3.2) installation will fail saying it does not have permissions. The way I got 3.1 to work is by setting WIXUI_DONTVALIDATEPATH to 1 – user3208131 May 19 '20 at 23:02
  • Which project type for Wise Installer? The old EXE based or the MSI based? Perhaps if your company isn't willing to modernize your application that MSI isn't the right tool for you. – Christopher Painter May 20 '20 at 12:58
  • Wise was the old installer we used. Wix is what we turned to last year – user3208131 May 20 '20 at 14:24
  • @ChristopherPainter: I used a wix installer since years, for mapped Drives and i work until now. user3208131 does it work if you delete everything in the folder. If yes you and I have the same Problem – sgt_S2 May 28 '20 at 12:50
  • Yes, it works if I delete everything in that folder. But, I get @ChristopherPainter's response. Mapped-drives in user context are not supported. I am just trying to figure work-arounds – user3208131 May 28 '20 at 14:20