[wix-users] How to ignore invalid/unavailable drive for an optional file/component?

Hoover, Jacob Jacob.Hoover at greenheck.com
Thu Nov 30 08:32:20 PST 2017


Adding a Component/Condition element to the install, and a CA to detect and assign properties would allow you to avoid the message,  however then you need to deal with servicing the MSI in a different state than when the initial install was done.  Personally, I would install this file locally, and use a semi-custom action to copy the file @ install time if the drive exists and is accessible.

File/@Vital='no' would allow you to continue if it failed.


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Kerem via wix-users
Sent: Thursday, November 30, 2017 6:48 AM
To: wix-users at lists.wixtoolset.org
Cc: Kerem <keremispirli+wixtoolset at gmail.com>
Subject: [wix-users] How to ignore invalid/unavailable drive for an optional file/component?

Hello all,
First of all, apologies if this is asked before. I tried to search the archives, but search page doesn't work. I see a "Documents 1 - 10 of 41 matches. More *'s indicate a better match." message and empty space under it. I tried with latest FireFox, Chrome, Edge and (gulp!) IE.

I create my installer with WiX 3.10.3. My installer installs a file (which is optional) to user's home directory (%HOMEDRIVE%%HOMEPATH%). Recently, upon a user complaint, I discovered that:
- If the %HOMEDRIVE% is a mapped network drive but it's disconnected, then the installer shows this error: "A network error occurred while attempting to read from the file: H:\..." and installer immediately fails.
- If the %HOMEDRIVE% is a nonexistent drive, then the installer shows this
error: "Invalid Drive B:\" and installer immediately fails.

Now, I don't have anything in my .wxs file for doing these checks for availability of the drives. Apparently MSI is doing these checks
automatically: These error messages correspond to errors 1316 and 1327 in Windows Installer Error Messages list(
https://msdn.microsoft.com/en-us/library/windows/desktop/aa372835%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
).
*My problem is that since this file is optional, I don't want these checks to be done for its path.* I couldn't find any documentation of this behaviour for neither Windows Installer nor WiX Toolset. Is there a way to disable those checks through WiX? Or any way at all?

Even if this particular file cannot be installed I want the installer to skip it and continue. Showing an error screen with "Abort" and "Skip"
options during installation would be ideal, but my Google-fu didn't cut it either.

Note: I posted the same question to StackOverflow but not only there was no answer, it got so little attention that it earned me a Tumbleweed badge. In case you're interested:
https://stackoverflow.com/questions/47413121/how-to-ignore-invalid-drive-for-an-optional-file-component

Thank you in advance!

Kerem Ispirli

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list