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

Kerem keremispirli+wixtoolset at gmail.com
Thu Nov 30 04:47:48 PST 2017


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


More information about the wix-users mailing list