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

How to run CA if particular component is installed


6 replies to this topic

Devang Parmar

Devang Parmar
  • Members
  • 64 posts

Posted 24 September 2001 - 15:02

Hello,

I want to show users AskYesNo dialog box depending upon particular component is being installed or not. User can install that component by going into custom setup install and chosing particular component.

Now, when user choses this component I want to show him some information as I said in AskYesNo box. I wrote CA for it, but how to fire this CA depending upon the component ?

Please help me in this.
Devang.


pdriley

pdriley
  • Members
  • 91 posts

Posted 24 September 2001 - 16:12

This, sadly, is one of the biggest failings of Windows Installer.  All the "is this installed" type flags are set in CostFinalize, so it's not at all easy to do anything dependant on what happens in the Custom Dialog.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 September 2001 - 16:40

Feature conditions work for me. CostFinalize just initializes them, but they are updated when the selection is changed.
The format is documented in MSI Help topic "Conditional Statement Syntax"

pdriley

pdriley
  • Members
  • 91 posts

Posted 24 September 2001 - 17:15

Really???  I read in more than one place that you couldn't (and I can't remember for the life of me where, but it was kind of convincing), so I've never actually tried it!

Actually, the issue at hand there was that in WinNT you could use them in the execute sequence because CostFinalize was run again, but in 9X it didn't work.  Or did I read that wrong?  Is it that NT re-initialises it?

Or have I been living a lie?!!?!?!  Is it actually possible that I can impress people after telling them that I didn't think it could be done by prooving now that it can?

I'm rambling... but this is ever so slightly exciting and may solve a big problem I have :)


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 September 2001 - 21:47

pdriley: you may be mixing up two things.

A) A condition on a custom action based on the selection state of a feature. This works, for instance the CA is only executed if the feature is being installed.

B) A condition on a feature (that would change its InstallLevel, and possibly make it invisible) based on user input. This doesn't work because feature coditions are only evaluated during CostFinalize.


pdriley

pdriley
  • Members
  • 91 posts

Posted 25 September 2001 - 16:26

See, I knew about (B) but it's distinctly possible that I read someone talking about (B) and thought they meant (A) wouldn't work either.  Seems unlikely but possible. :)

Either way, I had it completely worng and I'm a much happier being now that I've been corrected.  Apologies to Devang and thanks (again) to Stefan.