Installer.RemovePatches 方法

RemovePatches方法會將一或多個修補程式移除為有資格接收修補程式的產品。 RemovePatches方法會呼叫MsiRemovePatches

語法

Installer.RemovePatches(
  PatchList,
  ProductCode,
  UninstallType,
  PropertyList
)

參數

PatchList

字串,包含要移除之修補程式的分號分隔清單。 每個修補程式都可以由修補程式套件的完整路徑或修補程式 GUID 來表示。 此為必要參數。

ProductCode

字串,其中包含要從中移除修補程式的產品 GUID。 此為必要參數。

UninstallType

指定修補移除類型的整數值。 此參數必須是 msiInstallTypeSingleInstance

PropertyList

字串,指定要包含的 Property=Value 組。 這是選擇性參數。

傳回值

這個方法不會傳回值。

備註

如需示範應用程式如何從使用者可用的所有產品中移除修補程式的範例,請參閱 卸載修補程式

規格需求

需求
版本
Windows Server 2012、Windows 8、Windows Server 2008 R2 或 Windows 7 上的 Windows Installer 5.0。 Windows Server 2008 或 Windows Vista 上的 Windows Installer 4.0 或 Windows Installer 4.5。 Windows Server 2003 或 Windows XP 上的 Windows Installer 3.0 或更新版本。
DLL
Msi.dll
IID
IID_IInstaller定義為 000C1090-0000-0000-C000-000000000046

另請參閱

ProductCode

MsiRemovePatches

卸載修補程式

Windows Installer 2.0 和更早版本中不支援