I have a few questions about self-healing.

My MSI installs files in the [AppDataFolder]. When a new user logs in and clicks on the advertised shortcut, self-healing occurs and the files are copied to the correct folder. But if these files are deleted no self-healing occurs. Is there a way to fix this?

If you have multiple components in your CurrentUser feature, does each component need a keypath? Doesn’t self-healing repair the entire feature making a keypath per component unnecessary?

0 Comments   [ + ] Show Comments


  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
Please log in to comment



You need a Key Path for each component.

The way that the repair works is that it checks for each key path in each component. If you havent set one then there is nothing to check, the MSI wont know its missing, hence not being repaired.

One thing I have always wondered. Why make a REG dummy keypath for CurrentUser stuff when you can make a file the key path?
-saw someone else ask this, but there was no reply. Ive always used a dummy REG as I was advised it was best practice.

*Half correct in the repair feature statement, it dosent repair but checks the whole feature if there is a bung component.

Answered 07/12/2013 by: rileyz
Red Belt

  • From what I have experienced, I use reg paths because they ALWAYS work, some msi for some reason won't work with file keys, some do. Haven't really taken the time to figure out the difference, probably has something to do with some windows installer standard that vendors ignore or don't know about.

    In most cases for me, I just need to ensure a one time install (low expectation of file deletion by user etc). IF I need the solution to be rock solid like the OP, then I will test and see if file keys will work (if not I will figure out some other solution).
  • >I was advised it was best practice.
    Having a file-based KP will trigger ICE38 when the package is validated.
  • The MSI in question is my version of FireFox. We have custom profiles and extensions which get copied to the [AppDataFolder]. In testing we discovered that if a profile gets deleted, no self-healing takes place since all the keypaths are HKCU keys. The fix is to run a repair through Programs and Features. I was exploring other options when I posted the question.
  • > "In testing we discovered that if a profile gets deleted"

    Humm, if you were deleting the profile correctly and fully sholdnt you have a clean HKCU state??
    If your profile gets deleted, your NTUSER.dat should always get deleted as well, or your only really 1/2 doing the job.
  • FireFox profile not userprofile.
    • If you are worried about a complete profile deletion... then you can group up reg/files together in just a few components. The reason for making multiple components is if you think a single required file will be missing and you want that repaired.
Please log in to comment

Self healing from advertised shortcuts only checks the key file/path for components in the same feature (and any nested below) as the exe component that is being launched.  As a matter of fact, repair does the same thing, this is an important concept to understand when dealing with MSI packaging.  The difference between self-healing and repair is what is checked (the key file/path checking process is the same).  Repair checks all features and components installed originally.  Self-healing checks only the feature (and nested features) of the component which kicked off the self-heal (usually advertised shortcut exe but could be mime type etc).

The key above is the key file/path, if you have 100 files/reg entries in a single component it is all or nothing during a self-heal.  If the key file/path exists, the msi will skip the whole component, re-installing none of the 100 files/reg entries.  IF the key file/path is missing it will install all of them based on the additional rules in the file table.

Thus if you want to make sure every file is checked for, you will have to create separate components for each file, making them your key file(s) for each component.  So when the advertised shortcut is launched they are each checked (remember the components should be in the same feature as the exe/advertised shortcut component).

I have seen key files not work in advertised shortcuts, I usually use a HKCU reg entry.  Not saying files don't work, just HKCU entries seem to be more reliable.  For your case I would certainly test using the key files since that is what you will need.

Answered 07/12/2013 by: dandirk
Third Degree Green Belt

  • In my case there were 10 components in the CurrentUser feature. But what if you have 100 components? Manually creating 100 fake keys would be a major pain. Is there a shortcut? I'm using Installshield 2012.
  • 100 components would be an unlikely scenario. The sort of stuff that you would *need* to profilerate in a package would be things like registration information, product activation keys, and so on. Anything else that the app *might* put in HKCU, just let it! :-)

    Having said that, it would take only minutes in a text editor to create a .REG with 100 entries, wouldn't it? :-)
Please log in to comment
Answer this question or Comment on this question for clarity