Source Resiliency, A.K.A. Package Self-Repair
Software packages should not automatically repair data (local- or server-based data) on launch. Such an automatic repair could overwrite data changes made by the user. Therefore, components in the MSI that include data files (e.g. Access MDBs) will not contain a key path (thus disabling self-repair), even if this breaks the Windows logo.
The Self-repair (Source Resiliency) process will be reserved to repairing locally installed application executables, registry keys, shortcuts and system files. The package will never be able to repair to a server path (since the application is Run from Source and it is read-only), and under no circumstance should the package repair Data (User or Shared) even if the data resides locally.
In order to support roaming users or more specifically, multiple users using the same application on the same workstation, user data needs to be installed for each user using the application on the workstation.
In order to do this, a HKCU key should exist in the separate feature in the wsi, which will cause an install (or intentional one-time self-repair) of this feature for each user. This feature components should have the property "Leave installed on un-Install" and each component should not have a key path. This will be very useful in making the package to avoid self repairing.
There can also be a case when the application which contains HKCU keys undergoes a machine level deployment. In this case, when every user launches the shortcut, the application package will self-heal. This can be avoided by using active Setup which was discussed in previous articles of mine.
Some other reasons which causes the package to self-repair
- Having a temporary registry key as a component keypath.
- Having a temporary file as a component keypath.
Leave installed on un-install?
I am curious to know, why should the property "Leave installed on un-install" be checked?
Also can, you elaborate which component should not have a key path?
Hi, When we set the
Hi,
When we set the attribute "Leave Installed on Un-Install" that perticular component won't be removed during uninstallation.
This is one more flexiblity provided by Windows Installer for the user, if you think that a perticular component should be present in the machine even after the associated application is removed, then you set this attribute.
Usually in wise, all the COM objects are set with this attribute which is just a Precisionary measure to avoid "DLL Hell".
The basic advantage of windows installer is the Self-heal, which will be achived by the key path.
Components should not have a keypath:
If the perticular component is installed to a server or to a common drive (Other than ROOTDrive)
Files that should not be set as a keypath:
Usually if you have a database file (*.mdb) or any other file which will get changed during the course of the usage of the application then you should not keep such files as key path.
When a key path is missing, the application usually goes to a repair in which it puts back the original files. In such cases if a .mdb file is replaced with the original one, then all the data will be lost.
Note: If a component is not having any keypath, then the folder in which that component will install will be taken as the keypath.
Vijay Kumar
~~~~Problem is something which is having a solution~~~~
Vijay Kumar
~~~~Problem is something which is having a solution~~~~
Yeah... I do second
Yeah... I do second vijayksuvarna's thoughts on this!!
Also,There are few articles and tech-tips posted earlier by me on Key-path and its usage.
Hope it helps..
Cheers'
Viju
Microsoft MVP [Setup-Deploy]
Weblog: www.msigeek.com
interesting but incorrect..
sorry boys I don't second either of your thoughts..
The correct way to avoid self healing on a component is not but removing the keypath. If you want self healing to be disabled you should be removing Component code.
A blank keypath confuses self healing. A blank component code stops self healing data being written to the registry effectively disabling it.
read my blog if you want more detail on how.
John McFadyen
Installpac Pty Ltd
Phone: 0432 288 373
Email: john@installpac.com
Removing Component Code
One thing to note about removing the Component Code is that while this effectively turns off self healing on the component, this also prevents the component from being removed on install.
Would you like to reply?
Login or Register to post your comment.