Question: My wix installer has a custom action which runs only during upgrade and calls an exe to edit few conditions in the cached msi. This custom action runs before "Remove Existing Products". The installer runs successfully without errors on all windows environments except 2012 R2. 

On **Windows Server 2012 R2**, the installer fails at that particular custom action and throws error 110. I have tried running the installer as administrator but still it fails. I don't know the reason behind this failure. Any help is much appreciated.

Answer: 
If the installed product is broken then the standard solution is to fix it with a patch (msp) or a update by reinstalling/re-caching the product using a fixed MSI. By "fix it" I obviously mean correct whatever is causing the upgrade to fail in those conditions.

Otherwise the issue is that program, and finding out exactly where and why it is failing. We don't know if you're calling MsiOpenDabase, whether you're using C# P/Invoke and so on. It needs trace capability to say what's working and what isn't because the question is ultimately about why the code fails on a particular OS version. 

There are plenty of results for MsiOpenDatabase and 110, such as this:

[Error 110 (open\_failed) MsiOpenDatabase - error in the loop](https://stackoverflow.com/questions/32371150/error-110-open-failed-msiopendatabase-error-in-the-loop)
It's highly unusual to have to edit a cached MSI. This basically means you messed up and shipped a product without thoroughly testing. I would release a stand alone utility to get customers to a happy state before running the upgrade.

If you really want it to be 1 step I'd build a setup.exe for the MSI and wire the cleaner into that before launching your main MSI.