views:

629

answers:

2

I want to make a installation which can be both new installation and update installation. When it was used as an update installation, I want some files to be updated regardless the version and modified datetime. And some files would never be updated.

What I tried: Set the "REINSTALLMODE" to "amus". And set the "Never overwrite" property of never updated files' components to be "Yes".

What I get: It doesn't work. Those components with "Never overwrite = yes" are still updated somehow.

My question: Is this right? REINSTALLMODE has the higher priority than component's "Never overwrite" property? How to deal with this partial updates issue?

Thanks in advance.

A: 

MSI has specific File replacement logic.

I would look into doing a Major upgrade.

Assuming these are unversioned files (for example text/xml config files, not assemblies) I would manually set the File Version on any file I wanted to always be updated (the manually set version will override what is already installed), and leave alone the others which the file replacement logic should ignore.

Here is a doc about REINSTALLMODE=amus which mentions the 'a' means ignore file versioning rules and update everything. not what you want. Also, I believe REINSTALLMODE is generally for 'repair' operations, not install/upgrade anyways.

Rob McCready
A: 

We do something like this...

  1. Install files to program files
  2. Install default configuration to all users appdata
  3. Copy default config to per-user appdata if per-user config not found.

What this means is that if an update is applied, the default configuration is reset but the per-user configuration is not. All settings, etc are saved and not overwritten during the MSI update.

Depending on what files you're trying to "not update" I suspect you can probably do something along similar lines.

sascha
Great suggestion! Thank you. But this questions is based on an existing legacy system which didn't designed like this. Still thank you.
redjackwong