Need exact overview of the self-repair functionality.
As a repackager I normally use only 1 feature. But today I wanted to look into the feature construction more in depth.
I noticed that there is little information about the self-repair functionality and I'm currently looking for more information about the subject (books, docs, etc).
Please correct any misunderstanding that might be in the following:
What I (think I) know:
- A repair will be triggered when an advertised resource (shortcuts, COM, etc) is requested and a keypath of a component within that same feature or one of the parent features is missing.
- The repair triggered will reinstall the feature with the missing keypath of a component
What I have seen during tests:
- It seems that when a repair gets triggered on a feature, it will ask for a reinstall of that feature. (depending on REINSTALLMODE property) the feature will be reinstalled (fully). So components which have missing files, but which are not keypaths, will also be placed.
- It also seems that when a repair gets triggered on one feature, it will check the other installed features for missing keypaths. The difference in this is that the other missing keypaths will not trigger the full reinstall of the feature. Only the missing keypaths will be placed.
More information will be highly appreciated
Thanks in advance,
I noticed that there is little information about the self-repair functionality and I'm currently looking for more information about the subject (books, docs, etc).
Please correct any misunderstanding that might be in the following:
What I (think I) know:
- A repair will be triggered when an advertised resource (shortcuts, COM, etc) is requested and a keypath of a component within that same feature or one of the parent features is missing.
- The repair triggered will reinstall the feature with the missing keypath of a component
What I have seen during tests:
- It seems that when a repair gets triggered on a feature, it will ask for a reinstall of that feature. (depending on REINSTALLMODE property) the feature will be reinstalled (fully). So components which have missing files, but which are not keypaths, will also be placed.
- It also seems that when a repair gets triggered on one feature, it will check the other installed features for missing keypaths. The difference in this is that the other missing keypaths will not trigger the full reinstall of the feature. Only the missing keypaths will be placed.
More information will be highly appreciated
Thanks in advance,
0 Comments
[ + ] Show comments
Answers (10)
Please log in to answer
Posted by:
AngelD
17 years ago
Hi Frank,
Take a look at John's (jmcfadyen) detailed description of "Current User Healing" at http://itninja.com/question/how-do-you-roll-out-new-machines?4146&mpage=1
Depending on where the entrypoint is located that triggers self-healing check and the broken component a repair will occur on either feature or component level.
Take a look at John's (jmcfadyen) detailed description of "Current User Healing" at http://itninja.com/question/how-do-you-roll-out-new-machines?4146&mpage=1
Depending on where the entrypoint is located that triggers self-healing check and the broken component a repair will occur on either feature or component level.
Posted by:
FrankSpierings
17 years ago
Thanks this was very informative!
Still missing a bit of information regarding what I've seen during tests. What I saw yesterday during an MS Office 2003 repair was the following:
- Two features (lets call them 1 and 2) on the same level. (Other features above this level!)
- Both features contain a component with a HKCU key.
- Both feature contain a component which contains machine data (keypath to exe) + a quick launch shortcut (per user)
- User 1 installs the package with ALLUSERS=1.
- User 2 starts the application. A repair is triggered by feature 1-> HKCU component.
- The repair reinstalls the components contained in feature 1, so it also places the shortcut (although that components keypath was there!)
- The repair also checks feature 2, which is on the same level?! It repairs the missing HKCU component keypath, but doesn't place that other quick launch shortcut.
Please let me know if I'm missing something here.
[hr]Edit:
Have just seen the following happening, which does not correspond with jmcfadyen's explanation.
I have created a MSI which looks like the following:
[hr][Feature] User_Data
|
| - - - - <Component> UserComp {KeyPath} HKCU\Software\Test\Default
|
| - - - - [Feature] Machine_Data
|
| - - - - <Component> MachineComp {KeyPath} %ProgramFiles%\Test\Test.txt
| {Adv Shortcut} Test
| - - - - <Component> BigDummyFile {KeyPath} %ProgramFiles%\Test\BigDummyFile.dat[hr]jmcfadyen describes that when (entrypoint) <Component> MachineComp is started threw its shortcut, the Windows Installer will check if the keypaths are there, first of [Feature] Machine_Data, then of [Feature] User_Data, because that is its parent.
Now at this stage, let's say {KeyPath} HKCU\Software\Test\Default, of <Component> UserComp is not there.
What I understand from jmcfadyen is that only [Feature] User_Data should be repaired. But when I check the logs I see that it does a reinstall of the feature in which the entrypoint is located, [Feature] Machine_Data. Note that it still repairs the components of [Feature] User_Data, but it will also reinstall [Feature] Machine_Data.
When I move the entrypoint, <Component> MachineComp, to [Feature] User_Data, I see in the log that only that feature will be repaired in the same circumstances.
Have I misinterpreted something, or am I missing something, please let me know.
Thanks once again AngelID.
Still missing a bit of information regarding what I've seen during tests. What I saw yesterday during an MS Office 2003 repair was the following:
- Two features (lets call them 1 and 2) on the same level. (Other features above this level!)
- Both features contain a component with a HKCU key.
- Both feature contain a component which contains machine data (keypath to exe) + a quick launch shortcut (per user)
- User 1 installs the package with ALLUSERS=1.
- User 2 starts the application. A repair is triggered by feature 1-> HKCU component.
- The repair reinstalls the components contained in feature 1, so it also places the shortcut (although that components keypath was there!)
- The repair also checks feature 2, which is on the same level?! It repairs the missing HKCU component keypath, but doesn't place that other quick launch shortcut.
Please let me know if I'm missing something here.
[hr]Edit:
Have just seen the following happening, which does not correspond with jmcfadyen's explanation.
I have created a MSI which looks like the following:
[hr][Feature] User_Data
|
| - - - - <Component> UserComp {KeyPath} HKCU\Software\Test\Default
|
| - - - - [Feature] Machine_Data
|
| - - - - <Component> MachineComp {KeyPath} %ProgramFiles%\Test\Test.txt
| {Adv Shortcut} Test
| - - - - <Component> BigDummyFile {KeyPath} %ProgramFiles%\Test\BigDummyFile.dat[hr]jmcfadyen describes that when (entrypoint) <Component> MachineComp is started threw its shortcut, the Windows Installer will check if the keypaths are there, first of [Feature] Machine_Data, then of [Feature] User_Data, because that is its parent.
Now at this stage, let's say {KeyPath} HKCU\Software\Test\Default, of <Component> UserComp is not there.
What I understand from jmcfadyen is that only [Feature] User_Data should be repaired. But when I check the logs I see that it does a reinstall of the feature in which the entrypoint is located, [Feature] Machine_Data. Note that it still repairs the components of [Feature] User_Data, but it will also reinstall [Feature] Machine_Data.
When I move the entrypoint, <Component> MachineComp, to [Feature] User_Data, I see in the log that only that feature will be repaired in the same circumstances.
Have I misinterpreted something, or am I missing something, please let me know.
Thanks once again AngelID.
Posted by:
nheim
17 years ago
Posted by:
AngelD
17 years ago
Posted by:
jmcfadyen
17 years ago
I wrote that document years ago, it is a little shall we say untidy. But it gets the main point across well. I have some diagrams of the flow which may help to understand this, they seem to of been dropped from the original doco over the years.
I have an MSI I have constructed which demonstrates the self healing items described in the document. Also another point to add is that even if a feature is flagged for reinstall you should check each component also for state.
If you use the WILOGUTL.EXE it shows all the feature component state detail well which aids in the understanding of this. I haven't read that doco in years I should perhaps read it again and clean it up as it seems to get used alot.
Where I mentioned the entry point it starts checking at that feature. If nothing is broken it will step up the tree to check other features. One of the items which is often overlooked is if any component is in a broken state the entire MSI is checked. Therefore child features and same level features will also be checked.
If you want the MSI let me know and I will send it to you.
Cheers,
John
I have an MSI I have constructed which demonstrates the self healing items described in the document. Also another point to add is that even if a feature is flagged for reinstall you should check each component also for state.
If you use the WILOGUTL.EXE it shows all the feature component state detail well which aids in the understanding of this. I haven't read that doco in years I should perhaps read it again and clean it up as it seems to get used alot.
Where I mentioned the entry point it starts checking at that feature. If nothing is broken it will step up the tree to check other features. One of the items which is often overlooked is if any component is in a broken state the entire MSI is checked. Therefore child features and same level features will also be checked.
If you want the MSI let me know and I will send it to you.
Cheers,
John
Posted by:
FrankSpierings
17 years ago
Good morning guys, happy to see a couple of posts after the weekend ( + I have friday's off :)
Nheim, you are correct. I did use dummy files (text), so there is no version info. I've modified this and the result is that hashing does help somewhat, since the files won't be overwritten, still the component registration is executed fully for the components in the feature which holds the entrypoint component as well.
There is one thing I forgot to mention. When I check the logs, it actually states the command line of the repair, in which REINSTALL and REINSTALLMODE are included. The REINSTALL property is pointing to the feature in which the entry point is located (not the feature of the missing keypath, as reported in the eventviewer). Anybody any ideas on this?
John,
Yes I would like your sample MSI, so I can check this against my own test MSI. Maybe I just made one silly mistake somewhere.
Thanks guys,
Frank
Nheim, you are correct. I did use dummy files (text), so there is no version info. I've modified this and the result is that hashing does help somewhat, since the files won't be overwritten, still the component registration is executed fully for the components in the feature which holds the entrypoint component as well.
There is one thing I forgot to mention. When I check the logs, it actually states the command line of the repair, in which REINSTALL and REINSTALLMODE are included. The REINSTALL property is pointing to the feature in which the entry point is located (not the feature of the missing keypath, as reported in the eventviewer). Anybody any ideas on this?
John,
Yes I would like your sample MSI, so I can check this against my own test MSI. Maybe I just made one silly mistake somewhere.
Thanks guys,
Frank
Posted by:
jmcfadyen
17 years ago
Frank,
I would also check the installation states for the components in each feature. I haven't done any testing on this for at least 2-3 years now I have been under the assumption is hasnt changed with recent installer versions. (perhaps not a good assumption, I do however recall this was raised by someone else at the time as well)
I would repeat the same tests you are doing however extend the test to check the component states as well. I would assume that even though the features are flagged for install it will also check the keypath for each component which would be present effectively not installing the child feature you mentioned.
I will forward you the msi as well.
John
I would also check the installation states for the components in each feature. I haven't done any testing on this for at least 2-3 years now I have been under the assumption is hasnt changed with recent installer versions. (perhaps not a good assumption, I do however recall this was raised by someone else at the time as well)
I would repeat the same tests you are doing however extend the test to check the component states as well. I would assume that even though the features are flagged for install it will also check the keypath for each component which would be present effectively not installing the child feature you mentioned.
I will forward you the msi as well.
John
Posted by:
FrankSpierings
17 years ago
John,
Since I use two features these should be both marked as installed. I've checked this with the following code:
[font="courier new"]Dim objInstaller : Set objInstaller = CreateObject("WindowsInstaller.Installer")
msgbox objInstaller.FeatureState("{<ProductCode>}","<FeatureName>")
Unfortunatly Microsoft once again fails to correctly document the return values (http://msdn2.microsoft.com/en-us/library/aa369409.aspx)
But I presume a return code of 3 should mean [font="courier new"]msiInstallStateLocal
Which I received for both features.
I dont think you can really ask for the component state (although you could try to check every component keypath or somehing like that). I don't see a reason to do this either. please explain.
I think we are also miscommunicating here, so therefore I will try to explain my vision on what is happening once again.
[hr][Feature] User_Data
|
| - - - - <Component> UserComp {KeyPath} HKCU\Software\Test\Default
|
| - - - - [Feature] Machine_Data
|
| - - - - <Component> MachineComp {KeyPath} %ProgramFiles%\Test\Test.txt
| {Adv Shortcut} Test
| - - - - <Component> BigDummyFile {KeyPath} %ProgramFiles%\Test\BigDummyFile.dat
[hr]Feature: Machine_Data; Installed: Local; Request: Reinstall; Action: Reinstall
Feature: User [font="courier new"]_Data; Installed: Local; Request: Null; Action: Null
Components within Machine_Data feature are logged as follows:
[font="courier new"]Component: MachineComp; Install: Local; Request: Local; Action: Local
Components within User_Data feature are logged as follows:
[font="courier new"]Component: UserComp; Install: Local; Request: Null; Action: Local
So the thing I think is very odd here, is that the feature User_Data is missing a keypath. But the feature in which the entry point is located (Machine_Data) is fully reinstalled (as shown by the logged command line), while it has no missing keypaths.
Since I use two features these should be both marked as installed. I've checked this with the following code:
[font="courier new"]
msgbox objInstaller.FeatureState("{<ProductCode>}","<FeatureName>")
But I presume a return code of 3 should mean [font="courier new"]
I dont think you can really ask for the component state (although you could try to check every component keypath or somehing like that). I don't see a reason to do this either. please explain.
I think we are also miscommunicating here, so therefore I will try to explain my vision on what is happening once again.
[hr][Feature] User_Data
|
| - - - - <Component> UserComp {KeyPath} HKCU\Software\Test\Default
|
| - - - - [Feature] Machine_Data
|
| - - - - <Component> MachineComp {KeyPath} %ProgramFiles%\Test\Test.txt
| {Adv Shortcut} Test
| - - - - <Component> BigDummyFile {KeyPath} %ProgramFiles%\Test\BigDummyFile.dat
[hr]
- The above product is fully installed.
- I manually delete the keypath of component UserComp.
- I start the advertised "Test" shortcut
- A repair kicks in. The log specifying the following command line (not fully displayed here): [font="courier new"]
REINSTALL=Machine_Data REINSTALLMODE=pocmus - The log also shows:
Feature: User
Components within User_Data feature are logged as follows:
So the thing I think is very odd here, is that the feature User_Data is missing a keypath. But the feature in which the entry point is located (Machine_Data) is fully reinstalled (as shown by the logged command line), while it has no missing keypaths.
Posted by:
nheim
17 years ago
Posted by:
FrankSpierings
17 years ago
Nick,
That is correct. But all components within Machine_Data feature will still be re-registered. This process takes time. My motivation for only wanting to reinstall User_Data is that I want to create a very short repair cycle for packages that are going to be installed per-machine (ALLUSERS=1). I only want to place the items that need to be placed + I only want to reregister the components that need to be placed.
Also, I still don't fully understand how the repair mechanism works. As stated in an earlier post, I think the reinstall decision by Windows Installer is odd.
Thanks for your comment,
That is correct. But all components within Machine_Data feature will still be re-registered. This process takes time. My motivation for only wanting to reinstall User_Data is that I want to create a very short repair cycle for packages that are going to be installed per-machine (ALLUSERS=1). I only want to place the items that need to be placed + I only want to reregister the components that need to be placed.
Also, I still don't fully understand how the repair mechanism works. As stated in an earlier post, I think the reinstall decision by Windows Installer is odd.
Thanks for your comment,
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.