WIX – Embed powershell into an MSI file

You can embed a single powershell command into an wxs file like this:


You can find all my latest posts on medium.



		    NOT Installed AND NOT PATCH

Note, if DIR_v1.0 path contains spaces, e.g. “program files”, then you need to use “&qoute;”

Here’s another example, but this time using installutil.exe as an example:

				NOT Installed AND NOT PATCH



Any folder reference’s e.g. “DIR_v2” within square-brackets automatically get’s expanded.