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

Searching for Existing Applications, Files, Registry Entries or .ini File Entries

· 52CE 我爱测

Windows Installer can search for a specific file or directory during an installation. File or directory searches are used to determine whether a user has already installed a version of an application.

Windows Installer can search for a specific file or directory during an installation. File or directory searches are used to determine whether a user has already installed a version of an application.

AppSearch Action searches a user system for file signatures that are specified in the AppSearch Table. If the AppSearch action finds an installed file or directory with the specified signature, it sets a corresponding property, also specified in the AppSearch Table, to the location of the file or directory. When searching for a file, the file signature must also be listed in the Signature Table. If a file signature is listed in the AppSearch Table and is not listed in the Signature Table, the search looks for a directory, registry entry, or .ini file entry.

To expedite the search of a user computer, the Installer queries the following locator database tables in the order listed for a suggested search location:

  • If the file signature is listed in the CompLocator Table, the suggested search location is the key path of a component. If the signature is not listed in this table or not installed at the suggested location, the Installer queries the RegLocator Table for a suggested location.
  • If the file signature is listed in the RegLocator Table, the suggested search location is a key path written in the user registry. If the signature is not listed in this table or not installed at the suggested location, the Installer queries the IniLocator Table for a suggested location.
  • If the file signature is listed in the IniLocator Table, the suggested search location is a key path written in an .ini file present in the default Windows directory of a user system. If the signature is not listed in this table or not installed at the suggested location, the Installer queries the DrLocator Table for a suggested location.
  • If the file signature is listed in the DrLocator Table, the suggested search location is a path in the user directory tree. The depth of subdirectory levels to search below this location is also specified in this table.

The first time the Installer finds the file signature at a suggested location, it stops searching for this file or directory, and sets the corresponding property in the AppSearch Table. For more information, see the following:

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)

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

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