Why Does the Package Keep Reinstalling?

Why Does the Package Keep Reinstalling?
WiseUser's picture

Have you ever had a package that always goes for self heal? If so, here are a few points to check ...

If a key file is found to be missing on launch, Windows Installer will trigger a reinstallation of the parent feature. Having a "clean" package is key.

To find out just what the problem is, look in your Application Event log. Or for more detail, turn on Windows Installer logging and search for the word "error" in the resulting log file (found in %TEMP%).

Some common reasons why this may occur:

Missing Files or Registry Keys

Look closely- some files are deleted by the application itself. If your package contains such a file it will self-heal in order to restore the file each time.

Temporary Files Included In MSI

If any temporary files left on the system are captured in your package, they may cause self repairs to occur in order to restore them.

Correct Path for the components.

Sometimes the component will have a wrong directory path so right click each and every component and check for the directory.

HKEY_CURRENT_USER Keys in Package [Obvious]

HKCU Keys are installed only for the current user. Therefore, the first time the application is run by each user, the HKCU keys belonging to the package will not exist resulting in a reinstallation of the containing feature.

3.666665
Average: 3.7 (30 votes)

Key Path

There are 2 additions for this..

* Do not set a file as a keypath, which the user keeps modifying.
Files which have extentions like .mdb, .txt or .doc or anything which the user is prone to modify or delete. When the user doesn't need his document and deletes it, this results in package getting selfhealed.

* Sometimes, there may be packages of the same vendor which gets installed in same location.
for eg: C:\Program Files\Adobe\
In this case, if a common file exists in 2 or more packages and when one is un-installed, the other package goes for a toss or self heal.
In this case, we will need to identify that similar file, pull it out to a new component and enable the share count on it.

Advertise Entry point matters

Harsh's picture

Additional information just to add in knowledge base -
If Your package do not have any advertise entry point then your package won't heal at all.
Three advertise Entry points are
1. Shortcuts
2. File Associations
3. Com information
Now If your package contains any of the advertise entry point, Application will heal.
To enable self repair their should be atleast one advertise entry point.

MSI Self-Repair

Comonents are checked when entry points are found by the shell or the dll loader. Those entry points are windows descriptor and are in packaged format {Product, Feature, Component}. The shell or dll loader will call MsiProvideComponent that will check with the information found in the descriptor for broken keypath for each component of the feature. It will not check subfeatures only the same Feature and FeatureParents. After all installation (if nessessary) are done, the MsiProvideComponent will provide the full path of the component that will be started or loaded into the memory. The Windows descriptor informations are common stored in regkey called "command".

Syndicate content