1

Supposing I have a merge module that installs a file "MyFile.txt" to a certain location, and that I wish to use that merge module, however I want to supply a different copy of "MyFile.txt" from the one supplied with the merge module.

Is it possible to do this? (And for bonus points how can I do this using Wix)

Update: Roughly speaking MyFile.txt is part of a package up component of installable items that we provide to others, they then comine these components with their own to produce an installer.

In the ideal world they would only need to add new files to the output, however this is a replacement for an existing system where they currently have the ability to modify or even replace items (suce as MyFile.txt) in the end installer, and so without the ability to do the same with the merge module the migration path will be difficult.

The packaged up component doesn't need to be a merge module if there is a better solution, however merge modules seemed like the sensible choice and in all other respects provide a very nice re-usable package of installer logic.

Justin
  • 84,773
  • 49
  • 224
  • 367
  • Yes it is possible by using conditions on your components (the files all belong to a component that you nominate). But i can't tell you how to do it with WiX, but maybe this comment will give you a starting point. – slugster Jun 13 '10 at 07:03
  • That gets ugly that you can't do uncompressed msi's, validation will throw error messages because it doesn't understand the components are mutually exclusive and you tend to have confusion down the road from people trying to understand what goes into the install and they aren't aware of the components. – Christopher Painter Jun 13 '10 at 19:05

1 Answers1

0

It's possible but every technique that I know is a bit of a hack and doesn't scale very well. Can you tell me more about what type of file MyFile.txt is and what the intent of the different flavors of the file? Usually my goal is to never have the same filename twice ( darn component rules ) and then design variation points to support the needs. Sometimes upstream changes to the application are required to do this correctly.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • I've updated my question - essentially `MyFile.txt` is part of a package of installable files that we provide to others, who will combine this package with their own components to produce the end installer. This is a replacement for an existing system and sometimes the end installer needs to install a different version of this file instead (for example `MyFile.txt` might be a template which has been modified). – Justin May 13 '11 at 02:15