1

Inside our .NET Framework 4.6.2 solution; we have a WiX project responsible for generating the .msi installer package for our WPF application.

The generated .msi installs fine on my machine, but not on colleague's computer.

After investigating for a couple of hours, we concluded that it was because of the nature of the D:\ drive on my colleague's computer.

The .msi was being run from an alias hard drive. He created the alias by following instructions here. So an alias drive is just a regular folder on C:\ but you turn that into an alias hard drive.

When the .msi is run from outside the aliased drive, the program installs without any problems, otherwise he gets these errors:

The system cannot open the device or file specified

Clicking Retry doesn't do anything, but clicking cancel gives the following:

The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2755.

On my machine, I don't have any alias hard drives set up, and things just work, in other words, the program installs without any issues.

How do we get the installer to work with alias drives too?

J86
  • 14,345
  • 47
  • 130
  • 228

2 Answers2

2

This isn't supported by Windows Installer. The alias created by Subst only exists in the user profile that created it. MSI runs as SYSTEM and can't see it.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
0

Subst Considered Harmlessly Useless: Yes, as Chris states we have both seen this before. MSI is an old girl, and newer Windows features or old ones that are weird cause such problems.

Workaround: In the realm of workarounds, maybe check features and / or transforms:

  • Optional Features: what is this D:\ drive? Is it his personal data storage? Are you installing files into "My Documents" or something like that? It you make a separate feature for the components going into the D:\ drive and then unselect that feature from installation, does it then install? (albeit with a few missing files). Screen shot of feature selection.

  • Transforms: There are also other ways to achieve the suppression of features and files from installing. You can use transforms - little database fragments - to apply runtime changes to a running MSI installer. More on transforms here. Shorter version here. And just one more.

Administrative Installation: You can (also) get hold of the missing files from another computer, or maybe by running an administrative installation of the MSI: What is the purpose of administrative installation initiated using msiexec /a? (glorified file extraction).

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164