Kunal
Kunal

Reputation: 267

msiexec difference between reinstall and normal install

If I have a product installed on my system, how is reinstallation (msiexec /i REINSTALLMODE = vamus REINSTALL=ALL ) of the same product different from normal installation (msiexec /i )? Basically I want to know, what will be the behavior if I use "msiexec /i " when the product is already installed on the system.

Secondly, what will be the behavior if the msiFile has newer version number (ie minor upgrade) with product and upgrade codes the same?

Thanks, Kunal

Upvotes: 2

Views: 3125

Answers (3)

Philm
Philm

Reputation: 3674

I am not sure, which details you are really aware of and which not. Like PhilDW mentioned, "a" in "vamus" is a very dangerous, mostly wrong, choice for REINSTALLMODE, it is more for special usage by experts, than a standard command line. The exact reason is, especially for versioned files, you will overwrite existing higher versioned files (e.g. 2.0.0.0) with potential smaller versions in your msi, e.g. the same file(s) with fileversion(s) 1.0.0.0). Normally, this is not what you want, and what can be recommended.

There are few more severe and more nasty errors you can do in a setup than this. E.g. you could break any-third-party shared component with such stuff needing ending up in a whole windows reinstall for some customers !!

Use for example "vemus" for a repair-like reinstall, especially fileversion 1.0.0.0 will overwrite 1.0.0.0 (which it will not for REINSTALLMODE="vomus").

As Christoph mentioned, all depends on your special use case. My variations contain only two of the most important ones, "vemus" and "vomus".

-- Second, the MSI version numbers or different update types are not really related to the REINSTALLMODE parameter, the first are related to the whole msi setup, but REINSTALLMODE works several levels deeper on a file-by-file (reg entry) level.

-- Third, because of that file-level, REINSTALLMODE has important, nearly same, effects for a first-time-install, only always let away the "v" for first install (e.g. msiexec /i mysetup.msi REINSTALLMODE="emus"). The story, when exactly to use "v" and when not, is another one, so these two main cases should be enough here.

Subsummed, REINSTALLMODE works on a file-level, and has not much to do with the install scenario, besides the "v". REINSTALL is completely different. As PhilDW mentioned, it is used for the "small/minor" update/-grade type (and for repairs too, which makes it maybe a little bit confusing. In fact repair and the small/minor upgrade work technically mostly the same on file level).

These small/minor type has some traps, use it only, if you know for sure what you are doing. For beginners to medium-level setup authors Major Upgrades may be easier to use. Or uninstall always before an "update", then you have only one scenario to master: first install.

For a repair or reinstall of the same MSI file the following one is a good default line:

msiexec /i "c:\mysrc\mysetup.msi" REINSTALL=ALL REINSTALLMODE="vemus"

(logging params omitted here) HT detailed info helped.

Upvotes: 3

PhilDW
PhilDW

Reputation: 20800

Just to add to Chris' explanation: The plain /I is intended for the first install of a product. The command that has REINSTALLMODE= and REINSTALL= is intended for minor updates when you have updated the product with new versions and incremented the version number. And vamus is a bad idea anyway, especially if you have any 3rd party components such as Microsoft merge modules - you may end up deleting security fixes from the client system by downgrading their hotfix Dlls.

Upvotes: 3

Christopher Painter
Christopher Painter

Reputation: 55620

REINSTALLMODE doesn't have to be vamus, it can also be vomus or pmcs or any other number of combinations. The bevarior will vary. Custom actions may or may not fire depending on how you authored the conditions. For example if you used a condition of Not Installed it won't fire. If you used conditions like Not REMOVE="ALL" they will. Also if a component isn't marked as transitive the original condition will not be reevaluated.

Upvotes: 3

Related Questions