Self-repair, the scourge of society: There is so much to self-repair, I have written about it many times, but in essence it is about a component key path being missing (or broken), and Windows Installer trying to correct the situation by installing the missing component. If your component has a HKCU key path, then it will be installed for every user on application launch (via an advertised shortcut) - since every user's HKCU is different the resource must exist for each user. When Windows Installer runs to put this user-specific resource in place we refer to this as self-repair. Self-repair is also a generic mechanism to check that an application is properly installed in general (it is not just for user specific resources). Here is a very short, but more elaborate explanation of self-repair.
Find the culprit: It sounds like you know what component is triggering the self-repair. If you don't you can locate it using this procedure.
Resolving the problem: It is difficult to provide a generic fix for all situations. Very often you can remove the whole resource, for example if it is a HKCU registry key, you just remove it from the setup and your application can add it as a default value on first launch. This is not always possible - some applications cause all kinds of drama if default registry keys are missing (which shows a badly designed application - any application should write all user configuration defaults on launch), and in those cases I use either self-repair (effectively so it only runs once), or Active Setup - which is a Microsoft feature allowing "something runnable" to run once. See link for more technical details.
User-specific data and settings: Here is a piece on the distribution of user-profile files and registry settings - and how it has always been problematic. And some suggestions on how to deal with it. Not great, but should be worth a read: Create folder and file on Current user profile, from Admin Profile
Maybe provide some more technical details on what the resource really is, what the path in the registry is, what type of application it is, etc...
On the origin of self-repair: For your reference, here are some links with more information about self-repair than any sane person can digest :-):
- Self-repair - explained.
- Self-repair - finding real-world solutions.
- Self-repair - how to avoid it in your own package.
Some further links: