B.Flo
B.Flo

Reputation: 11

Uninstall MSI that was not installed with bootstrapper. Only uninstall when bootstrapper is uninstalling

I have an msi that is not installed by my bootstrapper that needs to be uninstalled when the bootstrapper is being uninstalled(not when it is being installed). Is there a way to do this in burn?

Upvotes: 1

Views: 228

Answers (2)

Harsh Pandey
Harsh Pandey

Reputation: 831

Use a custom action and set its ExeCommand attribute to the msiexec uninstall command with the /x parameter. You will need to know the product code of that MSI.

msiexec /x {Package | ProductCode}

You can read more about msiexec command and its parameters over here.

EDIT: To prevent it from running during installation set the condition of the custom action to Remove="ALL". Read more about it here.

Upvotes: 1

Sean Hall
Sean Hall

Reputation: 7878

Not today, there's an open feature request for bundles to be able to uninstall arbitrary MSI's by ProductCode - https://github.com/wixtoolset/issues/issues/4858.

Upvotes: 1

Related Questions