Loading
Self repair madness
Hey all,

 

I've created 2 features in InstallShield 2008:

 

- App

 

- Help

 

App contains a EXE and some DLL's with an advertised shortcut to the EXE.

 

Help contains a HTML file (key path) and an advertised shortcut.

 

Now, when I delete any file the feature NOT containing the file will not self-repair (as one would expect!). Now when I delete the CHM and the EXE, both features get repaired during self-repair. I would expect that only the feature I'm starting gets repaired. (This does work as expected when I advertise one of the features initially..

 

Could anyone explain this behaviour?

 

Kind regards,

 

 

Ren&233;

 

PS Free beer for any helpful answers ;-)

  • J Stechnij (Flexera Software)

    If App and Help are separate parent level features, the behavior you are seeing would be expected. You would either need to add an advertised entry point in the other feature (advertised shortcut, advertised file extension, or advertised COM CLSID), rearrange the feature tree, or use the Windows Installer API from your application to ensure features are properly installed. The following article contains some information on using the APIs from your application to trigger auto-repair:

     

    Application Resiliency: Unlock the Hidden Features of Windows Installer - http://msdn2.microsoft.com/en-us/library/aa302344.aspx

     

    Note that if you rearrange the feature tree, the Windows Installer performs auto-repair on a feature by feature basis from the current feature up to the parent level feature. So, for example, if a parent level feature contains an advertised shortcut to keyfile named notepad.exe that is present on the machine, and the feature has a child feature with a component whose keyfile is currently missing, an auto repair will not be triggered since nothing in the parent feature's components were missing. On the other hand, if the child feature contained an advertised shortcut to a keyfile that was missing, the parent feature's components would be verified when the Windows Installer find's a missing keyfile in the child feature's component.
    Expand Post
  • Hi Josh,

     

    Thanks for the reply... I understand your explanation, but the features are at the same level. Also, if one of the two features has ever been advertised on first install, the behavior is different, and things work as expected.

     

    Hope you can shed some light on this...

     

    Kind regards,

     

     

    René
    Expand Post
  • J Stechnij (Flexera Software)

    If the features are both parent level (or child level under different parent features) features the behavior you are seeing is expected.

     

    Advertising the feature(s) will result in different behavior as Windows Installer will install the features on demand. Install-on-demand is not equivalent to self-resilency/auto-repair and therefore the behavior will not be the same.
    Expand Post

Loading
Self repair madness