cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
GuyWithDogs
Level 4

Should I use transitive component setting to prevent registry changes on a Repair?

I've got an installer that has a component that creates entries in the registry. I only want to do that on a new installation. The user will then put values in for these entries that should remain unchanged on future upgrades AND if the user inadvertently triggers a repair installation.

I had a condition on this component of "Not Installed". But if a Repair is triggered (we delete a file or folder that's important to the program), then we're finding that the registry entries are being reset to the default installation values. That is, the user's change to the registry entries is overwritten.

Should I make this component re-evaluate its conditions? Or is there a "Not Repair" that I can add.

I've been reading and searching on here, plus hitting Google/Bing trying to get a decent idea of why the "Not Installed" isn't helping. Certainly nothing saying "Not Repair".
Labels (1)
0 Kudos
(4) Replies
weakness
Level 6

I don't think there is way to avoid auto-repair function.
And the behavior you confirmed is Windows Installer's specification.

The next best solution I think is below.

1. Create two features.

2. One has components which related to files, the other has component which related to registry entries.

3. Since Windows Installer auto-repair fixed the entries every functions,
registry entries will not be fixed even if any files are missing.(Because the file is related another feature.)
0 Kudos
GuyWithDogs
Level 4

weakness wrote:
The next best solution I think is below.

1. Create two features.

2. One has components which related to files, the other has component which related to registry entries.


Thanks! I hadn't thought about it that way. I'm going to give that a try when I'm in revising the install.
0 Kudos
weakness
Level 6

0 Kudos
GuyWithDogs
Level 4

weakness wrote:
Uh-oh... What is this document?

http://www.msigeek.com/268/avoid-self-healing-of-an-application

Thanks for the reference. I hadn't heard of/found that site before.

Having looked at the document, it's a confusing short reference to something that didn't help me. Likely because I'm not advanced enough to get the short-form type references to the pieces.

Your advice above, however, worked a treat. I created the new feature for the registry stuff and was able to do the same test (delete a folder) that caused the repair. Folder came back, but my registry changes were untouched.

Thanks for that!
0 Kudos