多包安装

Windows Installer 可以使用事务处理安装多个包。 此功能从 Windows Installer 4.5 开始提供。 安装程序将安装属于多包事务的所有包,或者不安装任何包。 如果无法成功安装事务中的所有包,或者用户取消安装,则 Windows Installer 可以回滚更改并将计算机还原到其原始状态。

多包安装包可以包含 MsiEmbeddedChainer 表,该表引用使用 MsiBeginTransactionMsiJoinTransactionMsiEndTransaction 函数的用户定义函数。

MsiPackageCertificate 表列出用于验证进行多包安装的安装包标识的数字签名证书。 可以使用此表减少多包安装显示需要管理员响应的用户帐户控制 (UAC) 提示的次数。

当 Windows Installer 安装、修复、更新或删除应用程序时,以下 Windows Installer 函数可以对用户的计算机进行更改。 从 Windows Installer 4.5 开始,安装程序可以回滚在多包安装事务处理期间由以下函数所做的更改:

MsiAdvertiseProduct
MsiAdvertiseProductEx
MsiApplyMultiplePatches
MsiApplyPatch
MsiConfigureFeature
MsiConfigureProduct
MsiConfigureProductEx
MsiInstallMissingComponent
MsiInstallMissingFile
MsiInstallProduct
MsiProvideAssembly
MsiProvideComponent
MsiProvideQualifiedComponent
MsiProvideQualifiedComponentEx
MsiReinstallFeature
MsiReinstallProduct
MsiRemovePatches

如果 Windows Installer 遇到属于包含 ForceRebootScheduleReboot 操作的多包安装的包,则会出现异常。 在这种情况下,Windows Installer 不会仅安装该包。 可以安装属于多包安装但不包含 ForceReboot 或 ScheduleReboot 操作的其他包。

Windows Installer 4.0 及更早版本:**不支持多包 Windows Installer 安装的事务处理**。 这些版本的 Windows Installer 无法将多个包的安装回滚为单个事务。

启用了远程桌面服务角色的 Windows Server 2008 R2:不支持。 如果启用了远程桌面服务角色,则使用 MsiEmbeddedChainer 表的多包安装将失败。