安装独立组件

当包包含独立组件时,Windows Installer 在安装应用程序期间执行以下作。 通常,Component_Shared是由Component_Application和其他客户端可执行文件共享的 DLL。

安装

  • 仅当安装Component_Application时,才会将Component_Shared的文件复制到与Component_Application相同的文件夹中。
  • 使用Component_Application密钥文件的短文件名创建零字节文件。 在与Component_Application相同的文件夹中找到此文件。 追加扩展。此文件名的本地位置。
  • 如果 msidbComponentAttributesSharedDllRefCount 位在 组件表的属性列中设置,则递增 SharedDLL refcount。
  • 将Component_Application注册为Component_Shared客户端,并注册指向Component_Shared共享位置的密钥路径。
  • 像往常一样安装Component_Application的所有资源。

如果计算机上已安装Component_Shared或其密钥文件,则不会将文件复制到Component_Shared的共享位置。

如果计算机上尚未安装Component_Shared或其密钥文件:

  • 将Component_Shared的文件复制到共享位置。
  • 处理Component_Shared的所有安装作。
  • 如果Component_Shared是 COM 组件,请注册完整的 COM 路径,以便语法 [$Component] 和 [#FileKey] 指向Component_Shared的共享位置。