cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gkriggs
Level 6

prerequisite with multiple conditions?

Hi,

I'm trying to create my own prerequisite with several conditions. I'm checking several registry keys and if any one of them is missing I want the prerequisite to run. However, what I'm finding is that if one registry entry does exist but another registry entry doesn't exist then the prerequisite doesn't run.

So it seems Install Shield is saying if any one condition does pass then I don't need to run the prerequisite. Whereas what I need is for Install Shield to say all the conditions must pass otherwise need to run the prerequisite. Is there any way to work around this? I guess I might need to create a separate prerequisite for each condition but that seems a bit awkward.

In particular I'm checking to verify all the IIS components my project needs have been enabled and if not I'll run dism.exe to enable all the IIS features needed.

Thanks,
Greg
Labels (1)
0 Kudos
(1) Reply
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Unfortunately you're correct; the boolean logic of arbitrary ands, ors and nots is not available to prerequisites. It always ors the operating system conditions together, and ands that result with all the other conditions; if the conditions you need to check don't compose that way, you're out of luck with prerequisites. Short of creating a prerequisite that always runs I'm not sure of any workarounds with prerequistes per se.

Full boolean logic is available in Suite project conditions, however (through All, Any and None combinations), and furthermore the Suite project has native support for installing Windows Features. Would that be an alternative you can consider?
0 Kudos