What do I do when launching an application triggers repeating, endless Windows Installer self-repair?

Self-Repair, Simple & Short Explanation: Why does the MSI installer reconfigure if I delete a file? Concrete Design Advice for your WiX / MSI File I keep trying to write about repeating MSI self-repair for developers, but end up with too much detail. Here is my last attempt: concrete design advice for what not to … Read more

Wix Installer : Setting component condition property when doing a MSIEXEC admin install at command line

Your Pre-processor Use I was half-way answering with a suggestion to use the pre-processor constructs (?if? et al) when I realized you only wanted a single MSI (at least at a time – it seems), so I skipped it. I normally use such constructs to compile flavors of MSI files from the same WiX source. … Read more

How to pass CustomActionData to a CustomAction using WiX?

Deferred custom actions can not directly access installer properties (reference). In fact, only CustomActionData property session.CustomActionData and other methods and properties listed here are available on the session object. Therefore, for a deferred custom action to retrieve a property such as the INSTALLLOCATION, you have to use a type 51 custom action — i.e. a … Read more

Removing files when uninstalling WiX

Use RemoveFile element with On=”uninstall“. Here’s an example: <Directory Id=”CommonAppDataFolder” Name=”CommonAppDataFolder”> <Directory Id=”MyAppFolder” Name=”My”> <Component Id=”MyAppFolder” Guid=”*”> <CreateFolder /> <RemoveFile Id=”PurgeAppFolder” Name=”*.*” On=”uninstall” /> </Component> </Directory> </Directory> Update It didn’t work 100%. It removed the files, however none of the additional directories – the ones created after the installation – were removed. Any thoughts on … Read more

WIX does not uninstall older version

Logging: To properly debug a failed major upgrade you need to create a proper log file (various ways to create log file – also by policy). msiexec.exe /i C:\Path\Your.msi /L*v C:\Your.log Auto-logging could be on: check the TEMP folder for any auto-generated log files there. If not, run again on a virtual to reproduce the … Read more

Wix to Install multiple Applications

Cohesion & Coupling: Bundling applications together in a single MSI file, may seem like a good idea. It seems intuitively nice and simple. However, speaking from real world experience I almost always end up splitting applications to install via their own MSI files, and I don’t like multi-lingual setups either (true multi-lingual setups are difficult … Read more

Windows Installer-Avoid FileinUse dialog box when Installing a package

“Short” Answer Essentially: you could 1) run completely silently (suppresses the files-in-use dialog), 2) shut down locking applications gracefully (application update to allow graceful shutdown – with or without restart manager support), 3) ensure proper service control (if dealing with services), 4) force-kill running processes (the “sledgehammer-approach”), 5) abort setup if locks are detected, 6) … Read more