Multiple-Package 安装

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 表的多个包安装 失败。