InstallFiles Action

[This is preliminary documentation and subject to change.]

The InstallFiles action copies selected files from the source directory to the destination directory.

The InstallFiles action operates on files specified in the File table. Each of these files is installed based on what is going to happen to its associated component in the Component table. Only those files whose components are resolved to the iisLocal Action state are eligible to be copied.

Database Tables Queried

Media Table

File Table

Component Table

Media.LastSequence Last sequence number on this media record.
Media.DiskPrompt Text identifier on media, for user prompting (localized text).
Media.VolumeLabel Volume label, used for disk validation.
Media.Cabinet For cabinet installs, the name of the cabinet file.
File.FileName Target file name (localized text).
File.Version File version (non-localized text).
File.State Installation status for the file (integer).
File.Attributes File and installation attribute flag bits (integer).
File.File Unique file token (non-localized text, primary key).
File.FileSize Uncompressed file size in bytes (long integer).
File.Language File language identifier (integer).
File.Sequence Sequence number on media (integer, unique).
Component.Directory_ Reference to Directory table item (non-localized text).
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 InstallFiles action must occur after the InstallValidate action and before any file-dependent actions.

Remarks

Action states determine what is going to happen to a file during the running of the installation script. However, even if the component is in the iisLocal state, the file is only copied if one of the following is true:

The value in the Action state is calculated during the file costing process. For more information, see the Feature table and the FeatureRequestState property.

Source Directory Determination

The determination of the source directory for each file to be copied depends on the SourceMode, which is dependent on the value in the Media.Cabinet column. For a full discussion of the SourceMode determination, see the Media table.

Prompting for Disks

If the source directory for a file to be copied resides on a removable disk (a floppy or CD-ROM), the InstallFiles action validates that the proper source disk is inserted before attempting to copy the file. To do this, InstallFiles searches for a disk of the same removable type that has a volume label that matches the value given in the Media.VolumeLabel field. If a matching mounted volume is found, the file copying process proceeds. However, if no match is found, a dialog appears requesting that the proper disk be inserted. In this case, the dialog uses the disk name found in the Media.DiskPrompt field as part of the prompt.

Possible Problems

If a file is replacing an older file, an error occurs, and that error is ignored, it is possible that the original file is deleted and not replaced. This is because the installer deletes the old file before making sure the new file is copied correctly.