简体   繁体   中英

WiX: Force installer to reinstall files if previously installed

So we have MSI that installs a patch consisting of two files and a registry entyry. It works fine on the initial installation, however if you try to reinstall it, it will not replace the files that it should. Is there a way I can have WiX force the MSI go to into reinstall mode rather than repair mode (I think that is what it is entering)?

Edit: Was asked to clarify the usecase, so here's a copy of the comment I left below.

So the usecase here is that a client has all the software installed, including this patch. Something doesn't work so they uninstall everything and then try to reinstall the software. When they do so this patch (msi) will not reinstall. It will see that it is already installed, and enter repair mode. From there it will see that the files exist, not caring that the files are older, and will not update them. We need those files updated whether the patch thinks it is currently installed or not.

It might help if you said exactly what's happening that makes this an issue.

When you install a patch, the files (and so on) are replaced, and now the patch is part of the product, not a separate thing that can be re-applied. Going into repair mode when trying to re-apply should be fine because the repair will be based on the initial product plus the patch, so any files that need repair will be repaired. You can't install the same patch twice any more than you can install the same MSI file twice - it's already installed! Hence my question about what you're seeing that is an issue. Is it not repairing correctly?

After seeing your edit, a patch is an msp file, not an MSI file. In order to uninstall everything both MSI products need to be uninstalled, not just the first one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM