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

Enable WiX project in Visual Studio 2013

Update 2013-12-02: WiX Toolset 3.8 is released with official support for Visual Studio 2013 editions. It is available for download from wixtoolset.org. You can manually enable Visual Studio 2013 compatibility with older versions of WiX: Copy C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\WiX to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\WiX Modify C:\Program Files (x86)\Microsoft Visual Studio … Read more

How can I find the product GUID of an installed MSI setup?

For upgrade code retrieval: How can I find the Upgrade Code for an installed MSI file? (or use the html table export script – shown below in section 2) Short Version The information below has grown considerably over time and may have become a little too elaborate. How to get product codes quickly? (four approaches): … Read more

xml.LoadData – Data at the root level is invalid. Line 1, position 1

The hidden character is probably BOM. The explanation to the problem and the solution can be found here, credits to James Schubert, based on an answer by James Brankin found here. Though the previous answer does remove the hidden character, it also removes the whole first line. The more precise version would be: string _byteOrderMarkUtf8 … Read more

How to Enable WiX Projects in Visual Studio 2015

Update 2015-09-08: WiX Toolset 3.10 is released with official support for Visual Studio 2015 editions. It is available for download from wixtoolset.org. You can manually enable Visual Studio 2015 compatibility with WiX 3.9 or earlier: Copy C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\WiX to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\WiX Then execute as Administrator: “C:\Program Files … Read more

How to add a WiX custom action that happens only on uninstall (via MSI)?

EDIT: Perhaps look at the answer currently immediately below. This topic has been a headache for long time. I finally figured it out. There are some solutions online, but none of them really works. And of course there is no documentation. So in the chart below there are several properties that are suggested to use … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)