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

RemoveFiles Action

· 52CE 我爱测

The RemoveFiles action removes files previously installed by the InstallFiles action.

The RemoveFiles action removes files previously installed by the InstallFiles action. Each of these files is gated by a link to an entry in the Component table. Only those files with components resolved to either the msiInstallStateAbsent state or the msiInstallStateLocal state if the component is installed locally, are removed.

Sequence Restrictions

The InstallValidate action must be called before calling RemoveFiles. If an InstallFiles action is used, it must appear after RemoveFiles.

ActionData Messages

Field Description of action data
[1] Identifier of removed file.
[9] Identifier of directory holding removed file.

Remarks

The RemoveFile table can be omitted from the installer database if there are no miscellaneous files to remove.

The RemoveFiles action can also remove author-specified files that are not installed by the InstallFiles action. These files are specified in the RemoveFile table. Each of these files is gated by a link to an entry in the Component table. Those files whose components are resolved to any active Action state (that is, not in the Off or Null state) are removed if the file exists in the specified directory. The removal of files specified in the RemoveFile table is attempted when the linked component is first installed, during a reinstall, and again when the linked component is removed.

The RemoveFiles action can also remove folders. An empty folder is removed if the value in the FileName column of the RemoveFile table is null.

When removing previously installed files, the RemoveFiles action queries the same fields in the same tables as those queried by the InstallFiles action with the exception that the Media table is not used by the RemoveFiles action.

The target file name can be specified in localized text in the FileName column of the RemoveFile table.

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)

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

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