Open topic with navigation
Companion Files
InstallShield 2015
Project: This information applies to the following project types:
The use of companion files enables you to bind the installation action of one file to another file. For example, if your installation project has two files—FileA.exe and FileB.dat—companion files let you bind FileB.dat to FileA.exe so that if FileA.exe needs to be installed or reinstalled, then FileB.dat is also installed or reinstalled. If FileA.exe needs to be uninstalled, then FileB.dat is also uninstalled.
Using Companion Files
This mechanism is useful when trying to override the Windows Installer’s default file versioning rules. For instance, file versioning rules state that for non-versioned files, any file on the target machine that has a modified date later than its created date is considered user data and should not be overwritten. This is not always a valid assumption, so you may want to use companion files to bind a non-versioned file to a versioned file.
Creating Companion File Associations
To create a companion file association:
|
1.
|
In the Files and Folders view, add the versioned file to your project. |
|
2.
|
Open the Components view. |
|
3.
|
In the Components explorer, expand the component that contains the file that you just added, and then click Files. Note the value in the Key column for that file. |
|
4.
|
Right-click the file and then click Add. |
|
5.
|
Select the unversioned file to add it to the selected component. |
|
7.
|
Select the Override system version check box. |
|
8.
|
In the Version box, type the name of the value noted in the Key column from step 3. |
Note: InstallShield generates a unique file key every time you add a file. Therefore, if you remove the file that you have created a binding to, it is possible that the file key will not persist. You would need to update the version of the unversioned file.
See Also
Overwriting Files and Components on the Target System