how to remove the Patch from console

2019-07-25 15:43发布

问题:

I am applying Patch to my programm with command line:

msiexec /p Patch.msp -l*v log.txt

But how to remove the Patch from console? Not to remove the product at all.Only Patch. Now I am using ARP Panel for this cause. But i can't get logs.

回答1:

No all patches can be removed individually. You must author a special kind of patch called "Uninstallable Patch" in order to remove it.

You can read more here on how to remove patches: http://msdn.microsoft.com/en-us/library/aa371212(VS.85).aspx



回答2:

Starting with Windows Installer 3.0, you can uninstall patches. There are two methods you can use on the command line:

  • Using MSIPATCHREMOVE on a command line
msiexec /i {GUID-OF-PRODUCT} MSIPATCHREMOVE={GUID_OF_PATCH} /qb
  • Using the standard command line options
Msiexec /package {GUID-OF-PRODUCT} /uninstall {GUID_OF_PATCH} /passive

For more information, read Uninstalling Patches article on MSDN.



回答3:

The other answers need product's GUID, it's not easy to get it. Here's another way:

Msiexec /i {installpath_of_product} MSIPATCHREMOVE={installpath_of_patch} /qb


标签: patch msiexec