Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Determining Files to be repaired


4 replies to this topic

Dave I

Dave I
  • Members
  • 195 posts

Posted 06 August 2001 - 15:30

How can I detect which files are scheduled to be repaired.  How does the Windows Installer do it?

Msi, Searching for a Broken Feature or Component  -
       "...the installer reinstalls a component or feature if it finds that the file or registry key specified in the KeyPath column of the Component table is missing. "

I delete 2 files that have been installed by my setup and then I run repair.  How do I go about getting a List of which files need to be repaired/are missing in a script.

I have tried using "MsiGetComponentState" but the nAction state returned is always -1 for the removed file INSTALLSTATE_UNKNOWN.

I am desperate for this one install peoples and will forever be in debt if someone can sort me out.


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 07 August 2001 - 09:35

If you are repairing from the maintenance dialog it reinstalls all the previously selected components.  

If the repair is prompted automatically just the required feature is reinstalled.

There is no list of broken componenst. On the sever side the REINSTALL property is a list of features to be reinstalled. I would expect Action states to be valid after InstallValidate.


Dave I

Dave I
  • Members
  • 195 posts

Posted 07 August 2001 - 12:31

Thanks Ian,  Its becoming apparent that my problem is my lack of understanding of the whole repair/resilience concept.

From what you are saying the ReInstall="ALL" does just that and attempts to reinstalls all selected components, if a correct file is already there the installer doesnt need to do anything, right?  I made the mistake that because the repair only took a fraction of the install time it was somehow being selective of the files it was repairing, what you say now makes sense.

OK I have got the Maintenance repair mechanism but what about self-repair.  I am not supporting Advertisement for this software release so have set all shortcuts and features to disallow advertisement.  Can my key files still be automatically repaired by the windows Installer, what could trigger this?  If I delete a file from my project then my installer is launched when I run Internet Explorer 5.5. I'm confused....

Self repair seems a good idea if a network source is available so repair can appear seamless but my setup will only be lauched from a CD so it will always prompt for the source CD to do the fix, not exactly slick.

Thanks for helping me get this area clear in my head.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 07 August 2001 - 16:06

"Advertise" for a feature means "install on demand" and has nothing to do with self repair, but with the "install on first use" option in the feature tree dialog.
Shortcuts that are advertised will trigger auto-repair. You can create shortcuts that are not advertised. these will not trigger auto repair.
Auto repair can be trigegred by other entry points than shortcuts (if supported by the OS), e.g. activating a COM control.
Auto-repair if launching IE might be caused by a bug in oleaut.msm, especially on Windows 2000. Are you using this merge module?
To find out what triggered the auto repair, check the event log.
You can package your setup in a self extracting executable that would extract the setup files to a directory on the user's computer and run setup from there. In this case the setup files will always be available for auto repair, even if the cd is removed. This of course requires that these exctracted setup files be not deleted when setup si finished, and they will consume disk space.