wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
130 stars 24 forks source link

REINSTALLMODE is overridden by Bundle #8775

Closed benperet closed 1 month ago

benperet commented 1 month ago

WiX Version

4.0.3

.NET or MSBuild or Visual Studio Version

.NET 8.0.401

HeatWave Version

N/A

Windows Version

Win11 24h2

Repro Repo

No response

Repro Steps

Hi, I have an MSI that configures the REINSTALLMODE flag to "amus". <Property Id="REINSTALLMODE" Value="amus" /> The reason I set that property is because of a security fix: `

` The security fix above fixes an attack where a malicious user creates a folder that the MSI installs its files into and set the folder permissions to whatever he likes. When the MSI runs, it doesn't change the permissions of the folder if it's already exist.

Anyway, I also have a bundle that installs the above MSI, the bundle for some reason overrides the REINSTALLMODE flag to "muso". On an upgrade, because of the security fix above, if there is a DLL in the newer MSI that is older version then the older MSI's DLL, the DLL will be removed by the older MSI (because of the security fix) but it won't be installed by the newer MSI, which basically means that the DLL won't be in the installation folder.

Is there a reason why the bundle overrides the REINSTALLMODE flag?

Actual Result

REINSTALLMODE flag is changed.

Expected Result

REINSTALLMODE flag shouldn't be changed.

Acknowledgements

  • [ ] I acknowledge that this is a fully completed bug report. It is not a question or attempt to get help debugging my issue (because those should be sent to Discussions).
bevanweiss commented 1 month ago

You might want to have a read through of these: https://wixtoolset.org/docs/development/wips/ba-configurable-reinstallmode/ https://github.com/wixtoolset/issues/issues/5911 https://github.com/wixtoolset/wix/pull/57