RemoveFiles Action

[This is preliminary documentation and subject to change.]

The RemoveFiles action uninstalls 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 whose components are resolved to the iisAbsent Action state (or the iisSource Action state if the component is currently installed locally) are removed.

The RemoveFiles action can also remove specific 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). This implies that removal of files specified in the RemoveFile table is attempted when the gating component is first installed, during a reinstall, and again when the gating component is removed.

The RemoveFiles action can also remove folders. You can indicate that a folder be removed if it is empty by leaving the FileName column of the RemoveFile table null.

Database Tables Queried

File Table

RemoveFile Table

Component Table

While uninstalling previously installed files, the database table fields queried are identical to those queried by the InstallFiles action (except that the Media table is not used at all by RemoveFiles).

While removing files specified in the RemoveFile table, the following fields are queried:

RemoveFile.FileName Target file name (localized text).
RemoveFile.DirProperty Property name that should resolve to a valid full directory path.
Component.Component Unique name for the component item (text, primary key).
Component.Action Enum indicating the action to be taken.

Properties Used

None

Sequencing Restrictions

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

Remarks

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