- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Best practice question - Component for each file or an explicit list of files
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Posting on behalf of Leica-Microsystems.
cc: markus.ott@leica-microsystems.com, dominic.finke@leica-microsystems.com
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @ejohnson1 ,
It depends upon the type as well functionality of an application.
- If it is can be grouped under single component better to have to files under single component.So that for minor upgrade,we can remove only files under component.Since component removal is not allowed as part minor upgrade component rules.
-
One reason for "one file per component" is resiliency. When an application is started, Windows Installer can check whether the keypath of any component is missing. If the keypath is missing, the component is reinstalled/repaired.
If a component has multiple files, then only one file can be the keypath. In wix you indicate this by setting
KeyPath=yes
on a File element. The other files will then not be fully protected by Windows Installer resiliency. They will only be reinstalled if the keypath file goes missing. -
Another reason to have "one file per component" is when installing files to locations where they may already be present (e.g. an application upgrade, or when installing to
c:\windows\system32
). Windows installer determines whether a component needs to be installed by checking the keypath. If the keypath is a file and the file is already there (with the same version or higher) then the component is not installed. That's a problem if the other files in the component actually needed to be installed/upgraded.
Hope it helps,
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @ejohnson1 ,
It depends upon the type as well functionality of an application.
- If it is can be grouped under single component better to have to files under single component.So that for minor upgrade,we can remove only files under component.Since component removal is not allowed as part minor upgrade component rules.
-
One reason for "one file per component" is resiliency. When an application is started, Windows Installer can check whether the keypath of any component is missing. If the keypath is missing, the component is reinstalled/repaired.
If a component has multiple files, then only one file can be the keypath. In wix you indicate this by setting
KeyPath=yes
on a File element. The other files will then not be fully protected by Windows Installer resiliency. They will only be reinstalled if the keypath file goes missing. -
Another reason to have "one file per component" is when installing files to locations where they may already be present (e.g. an application upgrade, or when installing to
c:\windows\system32
). Windows installer determines whether a component needs to be installed by checking the keypath. If the keypath is a file and the file is already there (with the same version or higher) then the component is not installed. That's a problem if the other files in the component actually needed to be installed/upgraded.
Hope it helps,
Thanks,
Jenifer
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)