大网数据广告活动
安装更新与部署

Isolated Components

· 52CE 我爱测

Authors of installation packages can specify that the installer copy the shared files (commonly shared DLLs) of an application into that application's folder rather than to a shared location.

Authors of installation packages can specify that the installer copy the shared files (commonly shared DLLs) of an application into that application's folder rather than to a shared location. This private set of files (DLLs) are then used only by the application. Isolating the application together with its shared components in this manner has the following advantages:

  • The application always uses the versions of the shared files with which it was deployed.
  • Installing the application does not overwrite other versions of the shared files by other applications.
  • Subsequent installations of other applications using different versions of the shared files cannot overwrite the files used by this application.

Because the current implementation of COM keeps a single full path in the registry for each CLSID/Context pair, it forces all applications to use the same version of a shared DLL. To enable an application to keep a private copy of a COM server, the system loader in Windows 2000 checks for the presence of a .LOCAL file in the application's folder. If the system loader detects a .LOCAL file, it alters its search logic to prefer DLLs located in the same folder as the application.

When Windows Installer runs the IsolateComponents action they copy the files of the component (commonly a shared DLL) specified in the Component_Shared column of the IsolatedComponent table into the same folder as the component (commonly an .exe file) specified in the Component_Application column. The installer creates a file in this directory, zero bytes in length, having the short file name of the key file for Component_Application (typically the name is the same as the application's .exe) appended with .LOCAL. The installer uses the registration for the component in its shared location and does not write any registration information for the copy of the component in the private location.

For more information, see:

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。