Blog
MSI File Tables group include tables that specify the files to be used in the installation. This includes files to be installed, moved, or duplicated, as well as to be self-registered. File Tables group includes the following tables:
File: (MSI File Tables)
What is a File table?
This particular table lists entire files of an msi file. File table has the following columns

File:
This column contains the unique name or sign for identifying a particular file.
Component:
This column references to a component containing the file.
FileName:
This column references the file name, used for installation. FileName should match the case of the source files exactly.
FileSize:
This particular column references to the size of the file in bytes which is a non-negative value.
Version:
This is the version string for the file. It can also be left null in the case of unversioned files.
Language:
A list of decimal language IDs separated by commas.
Attributes:
The integer that contains bit flags that represent file attributes.
The following table shows the definition of the bit field.
Constant | Decimal | Description |
msidbFileAttributesReadOnly | 1 | Install the file as read-only. |
msidbFileAttributesHidden | 2 | Install the file hidden. |
msidbFileAttributesSystem | 4 | Install the file as a system file. |
msidbFileAttributesVital | 512 | This file is vital for the component to operate properly. |
msidbFileAttributesChecksum | 1024 | The file contains a valid checksum. Executable files generally contain a checksum. |
msidbFileAttributesPatchAdded | 4096 | This indicates that this particular file is installed by a patch rather than by a full Installer database. |
msidbFileAttributesNoncompressed | 8192 | The file is uncompressed on the source. |
msidbFileAttributesCompressed | 16384 | The file is compressed on the source. |
Sequence:
This number is used to identify which of several source disks a file might be on, by consulting the Media table.
RemoveFile: (MSI File Tables)
What is a RemoveFile table? RemoveFile table lists files that the Installer should remove. If some files remain installed even after the uninstallation of the MSI file the entry of those files should be made in these tables, for clean uninstallation of the MSI file. RemoveFile table has the following Columns:

FileKey:
This is an arbitrary key to identify this particular entry in the table. It can be the same as the filename.
Component:
The file removal action is controlled by this component.
FileName:
This column holds the name of the file to be removed. If the FileName is null, the entire folder is removed instead, but only if it is empty.
DirProperty:
This column holds the name of a property that resolves to a full path and directory.
InstallMode:
This value controls what the Installer will actually do and must be one of the following values.
Decimal Value | Description |
1 | Remove only when the associated component is being installed. |
2 | Remove only when the associated component is being removed |
3 | Remove in either of the above cases |
MoveFile:
What is a MoveFile table?
MoveFile table lists files that the Installer should move or copy during the installation. This table contains following columns:

FileKey:
This is an arbitrary key to identify this row of the table.
Component:
This is a foreign key into the Component table that identifies the component that this move or copy action is related to.
SourceName:
This column holds the name of the file to act on.
DestName:
This column contains the name to be given to the file after it’s moved or copied. If it’s blank, the source name is used.
SourceFolder:
This column contains a property that resolves to full path and filename.
DestFolder:
The name of a property whose value resolves to the full path to the destination folder.
Options:
Value | Action |
0 | To copy the file |
1 | To move the file |
Duplicate File:
What is a DuplicateFile table?
This table contains a list of files that need to be duplicated to multiple locations when the product is installed. This table contains following columns:

FileKey:
This is a unique identifier for the row in the table. We can use the filename as FileKey.
Component_:
The value in this column is a foreign key to the Component table. If the component this key points to isn’t installed, then this duplicate file action isn’t carried out.
File_:
This is a foreign key into the file table. This key identifies the file that is to be duplicated.
DestName:
This is the name to be given to the duplicate file. If this column contains a null, then the duplicate copy will have the same name as the original.
DestFolder:
This is a property that resolves to the full path where the duplicate should be located.
IniFile:
What is an IniFile table?
This table is one of the most important file tables that are used often. The IniFile table contains information that needs to be written to .ini files during an installation. If an .ini file is present as a normal file table entry, if possible delete the file from normal file table and add the same .ini file as ini file table entry. This table contains following columns:

IniFile:
This is a unique identifier for this table. This can be the name of the .ini file.
FileName:
This is the actual name of the .ini file to be modified.
DirProperty:
This is a property that resolves to the name of the directory that contains the desired .ini file. If this column contains a null, then the .ini file is created in the folder having the full path specified by the Windows Folder property.
Section:
This is the .ini file section to modify.
Key:
This is the key in the specified section to modify.
Value:
This is the value to use for this key i.e., localizable value to be written.
Action:
Type of modification to be made.
Value | Action |
0 | To create or update an entry |
1 | To create an entry only if the specified key doesn’t already exist |
3 | To create a new entry or append a new comma-separated value to an existing entry. |
Component_:
A foreign key into the Component table that identifies the component that this action is related to.
RemoveIniFile:
What is a RemoveIniFile table?
RemoveIniFile table contains information that the Installer should delete from an existing .ini files (but does not remove .ini files themselves). This table contains the following columns:

RemoveIniFile:
This is a key for this table.
FileName:
This is the actual name of the .ini file to be modified.
DirProperty:
This is a property that resolves to the name of the directory that contains the desired .ini file.
Section:
This column refers the .ini file section to modify.
Key:
This is the key in the specified section to modify.
Value:
This is the value to be deleted from this key. A value is required when the Action column is 4, optional otherwise.
Action:
This is a code indicating the action (modification) to be taken.
Value | Action |
2 | Delete the entire key, |
4 | Delete a specified value from a list of values in the key. |
Component_:
This is a foreign key into the Component table that identifies the component that this action (deletion of .ini file) is related to.
Font Table:
What is a Font table?
The Font table is used to list fonts that the Installer should register on the user’s system. Font Table contains the following columns:

File:
It identifies the file that contains the font to be registered.
FontTitle:
It is recommended to leave this column null for TrueType Fonts and TrueType Collections because the installer can register the font after reading the correct font title from the font file. If the font name is entered, it must be identical to font title from the font file. For example: We have to specify a title for fonts that do not have embedded names, such as .fon files
SelfReg Table:
What is a SelfReg table?
The SelfReg table contains information about modules that need to be self registered. The installer calls the DLLRegisterServer custom action during installation of the module; it calls DLLUnregisterServer custom action during uninstallation of the module. The installer does not self register EXE files. If we want to register any file we have to navigate to that specific file in the msi and right click that particular msi and select the option ‘register ‘ . SelfReg table contains the following columns:

File_:
It identifies the file that should be self-registered and it functions as a foreign key to the File table.
Cost:
The cost of registering the module in bytes. This must be a non-negative number.
Example for application of selfReg table:
A) Suppose there is an entry of a file in selfReg table, so to remove the entry from selfReg table follow the instruction: Navigate through the ‘Installation Expert ‘ and right click on the file which has an entry in the selfReg table and select the option ‘Do not register ‘ as shown below.

Media:
What is a Media table?
Media table describes the set of disks that make up the source media for the installation. This table contains the following columns:

DiskId:
This column determines the order that the media are processed in.
LastSequence:
This is the file sequence number (corresponding to the Sequence column of the File table) for the last file on this particular piece of media. A disk contains all files between the LastSequence number for the previous disk and the LastSequence number for itself.
DiskPrompt:
This is the name that the Installer will use to prompt the user for this particular disk.
Cabinet:
This is the name of the cabinet file on the disk, if any of the files on the disk are compressed into a cabinet file. If there is no cabinet file on the disk, this column should be null.
VolumeLabel:
This is the physical volume name of the disk. The Installer uses this to verify that the correct disk is in the drive.
Source:
This column is only used by patch files, and only if a cabinet file with the patch files is located somewhere other than the original media. For normal installations this column should be left null. If the source files are contained within the Installer package itself, in a cabinet file stored in a stream, and it is still needed to make an entry in the Media table. In this case, though, we must prepend a pound sign (#) to the cabinet filename.
BindImage Table:
What is a BIndImage table?
BindImage table contains information about each executable or DLL that needs to be bound to the DLLs imported by it. This table contains the following two columns:

File_:
It identifies the file that should be self-registered and it must be an executable file.
Path:
A list of paths, separated by semicolons, which represent the paths to be searched to find the imported DLLs. The list is usually a list of properties.
Environment Table:
What is an Environment table?
Environment table contains information on environment variables that the Installer should set or remove. Environment table is basically used to resolve the hard coded paths in the MSI file or application. For example we can set “C:\WINDOWS” to SystemRoot. Some of the important environmental variables are shown in the below table. To see all the environment variables type ‘set’ on the command line as shown below. This table contains the following columns:
Environment Variable | Value |
SystemDrive | C: |
SystemRoot | C:\WINDOWS |

Environment:
This is the primary key of the table.
Name:
The Name column contains a prefix and the name of the environment variable. The prefix indicates what action the Installer should take.
PREFIX | ACTION |
= | Set the environment variable during installation. |
+ | Create the variable if it doesn’t exist, and set it during installation. |
– | Remove the environment variable when the component is being installed. |
* | Under Windows NT or Windows 2000, this puts the environment variable in the system environment; otherwise, it is placed in the user environment. |
=- | Set the variable on install and remove it on uninstall. |
!- | Remove the environment variable whether the component is being installed or uninstalled. |
Value:
This is the value that is to be set for the variable.
Conditions:
Field Value | Corresponding Action. |
Empty | variable is removed |
Field is blank and the string in the Name field is prefixed by the – symbol | The variable is removed only when the component is removed. |
Prefixing the string by the Null character [~] and the separator character. Eg: [~];Value | To append a value to the end of an existing variable |
Append the string in this field by the separator character and the Null character [~].Eg: Value;[~] | To prefix a value to the front of an existing variable |
If no [~] is present in the field | The string represents the entire value to be set or deleted. |
Component:
Indicates the component that’s associated with the setting.
Icon Table:
What is an Icon table?
The Icon table contains information necessary to create desktop icons. This table contains the following columns:

Name:
This is the name to use for the icon file.
Data:
This is the actual icon data, in PE (.exe, .dll) or icon (.ico) format. Generally, we should make entries in this table for each shortcut, file extension, and CLSID registered with the Installer. When we want the products to be advertised, where the icon needs to be present on the user’s desktop without the product being installed, and this table provides alternative files that have the icons for advertised products.
CreateFolder Table:
What is a CreateFolder table?
The CreateFolder table contains information about folders that the Installer should create explicitly. This table contains the following columns:

Directory_:
This is a foreign key into the Directory table, which identifies the folder to be created.
Component:
This is a foreign key into the Component table, which identifies the component that requires this folder. This table is intended primarily for the creation of empty folders.
Example for the application of CreateFolder table:
A) To resolve ICE 64 errors we have to make an entry of the folder in the CreateFolder table.