cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
timstspry
Level 7

Basic MSI Project - Prerequisite Question

Hello, I have a basic MSI project in which I would like to uninstall a given product using msiexec.exe /x {ProductCode}. However, it appears that you must actually add a file to the Files to Include tab in order to run an executable. I don't really want to add the msiexec.exe to a prerequisite, and would like to know how to do what I am asking if it can be done.

Thanks in advance!

Tim
Labels (1)
0 Kudos
2 Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I don't think it can quite be done the way you're doing it. As a total hack, you could theoretically create a stub .msi which matched the package and product code of that you wanted to uninstall, and run it with REMOVE=ALL /qb (or /qn) as its command line. But this is enough of a hack I can't recommend it.

The proper way to do this with our architecture would be to create a helper exe in e.g. C++, or perhaps even just a vbs file, which will invoke the msiexec command line you want when it is run. An alternate non-prerequisite approach may be to use a Major Upgrade item to remove this alternate product by its upgrade code and version. If this satisfies your needs, I would probably prefer it to the other approaches.
0 Kudos
TimStVCS
Level 7

Thanks for the input Michael!

Tim
0 Kudos