RemovePatches 方法Installer.RemovePatches method

RemovePatches 方法将一个或多个修补程序移到有资格接收修补程序的产品。The RemovePatches method removes one or more patches to products eligible to receive the patch. RemovePatches 方法调用 MsiRemovePatchesThe RemovePatches method calls MsiRemovePatches.

语法Syntax

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

参数Parameters

PatchListPatchList

一个字符串,其中包含要删除的要删除的修补程序列表(以分号分隔)。A string that contains a semicolon delimited list of patches to remove. 每个修补程序都可以通过修补程序包的完整路径或 patch GUID 来表示。Each patch can be represented by either the full path to the patch package or by patch GUID. 此参数是必需的。This parameter is required.

ProductCodeProductCode

带有要从中删除修补程序的产品 GUID 的字符串。A string with the GUID of the product from which the patches are to be removed. 此参数是必需的。This parameter is required.

UninstallTypeUninstallType

一个整数值,该值指定修补程序删除的类型。An integer value that specifies the type of patch removal. 此参数必须是 msiInstallTypeSingleInstanceThis parameter must be msiInstallTypeSingleInstance.

PropertyListPropertyList

一个字符串,指定要包括的属性 = 值对。A string that specifies the Property=Value pairs to include. 此参数可选。This parameter is optional.

返回值Return value

此方法不返回值。This method does not return a value.

备注Remarks

有关演示应用程序如何从可供用户使用的所有产品中删除修补程序的示例,请参阅 卸载修补 程序。See Uninstalling Patches for an example that demonstrates how an application can remove a patch from all products that are available to the user.

要求Requirements

要求Requirement Value
版本Version
Windows Server 2012、Windows 8、Windows Server 2008 R2 或 Windows 7 上的 Windows Installer 5.0。Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Server 2008 或 Windows Vista 上的 Windows Installer 4.0 或 Windows Installer 4.5。Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Server 2003 或 Windows XP 上的 Windows Installer 3.0 或更高版本。Windows Installer 3.0 or later on Windows Server 2003 or Windows XP.
DLLDLL
Msi.dll
Msi.dll
IIDIID
IID _ IInstaller 定义为000C1090-0000-0000-C000-000000000046IID_IInstaller is defined as 000C1090-0000-0000-C000-000000000046

另请参阅See also

ProductCodeProductCode

MsiRemovePatchesMsiRemovePatches

卸载修补程序Uninstalling Patches

在 Windows Installer 2.0 及更早版本中不受支持Not Supported in Windows Installer 2.0 and earlier