# Setting REINSTALLMODE in WIX template

**URL:** https://discourse.cmake.org/t/setting-reinstallmode-in-wix-template/10270
**Category:** Development
**Created:** [March 3, 2024, 4:47am UTC](https://discourse.cmake.org/t/setting-reinstallmode-in-wix-template/10270 "2024-03-03T04:47:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [March 3, 2024, 4:47am UTC](https://discourse.cmake.org/t/setting-reinstallmode-in-wix-template/10270/1 "2024-03-03T04:47:42Z")

</div>

CMake’s own `WIX.template.in` (in the `Utilities/Release/WiX` directory) contains the following line, which is not present in the general `WIX.template.in` that is used by default with the WIX CPack generator:

```auto
<Property Id="REINSTALLMODE" Value="amus"/>

```

According to [this stackoverflow answer](https://stackoverflow.com/a/71225056/1938798), it looks like this shouldn’t be set in the template file, but rather it should be a run time setting only. Maybe I’m misunderstanding where the WIX.template.in fits into the picture, but it seems like maybe we shouldn’t be including the above line in CMake’s template? @brad.king

I was looking at differences between CMake’s own `WIX.template.in` and the general purpose one the WIX CPack generator provides and noticed this change. I was looking at whether we wanted to apply the [change from MR 8954](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8954/diffs#ef92b7a9b922acf383831cc34cc82f34dd8ecbff) to CMake’s own WIX template for consistency, even though it shouldn’t actually change the resultant package for now since CMake’s own template currently hard-codes `perMachine` for the `InstallScope` anyway.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [March 12, 2024, 5:05pm UTC](https://discourse.cmake.org/t/setting-reinstallmode-in-wix-template/10270/2 "2024-03-12T17:05:49Z")

</div>

The reinstall mode was added to CMake’s private WIX rules so that the resulting `.msi` would be able to replace newer versions instead of only replacing older versions. I don’t know if there is another way to achieve that, but it hasn’t been a problem in practice AFAIK.
