JTaylor
Posts: 3
Joined: Wed Jul 14, 2004 3:36 pm

How do I set custom properties for conditional installs?

Hi all,

I'm currently evaluating AI 1.7 and I'm not quite sure how to perform the following task:

1. Check for the existence/value of a registry key (and set a property).
2a. Depending on the result, prompt an error and exit the installer OR
2b. Perform the install of a component depending conditioned on the property I set in step 1.

I've searched this forum and only see basic references to "You need to write a custom action", but never any addtl. details.

So, if I write a custom action, WHEN does it get executed? In MSI, custom actions can be executed at any given time, but AI doesn't allow me to specify exactly when they run.

For my above example, I'd need Step 1 and 2a performed even before ANY dialogboxes get shown.

The next issue: How can I set a global property via my custom action and use it in the components installation as a condition? My code would set a property and then the component should only get installed by using the condition PROPERTY = "true" or something like that.

What am I missing? Can this be done? If so, HOW exactly?

I appreciate any help on this.
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Hi Taylor,

I am afraid that Advanced Installer cannot yet do what you need.

We are getting there though. Starting with v1.7, you can specify conditions on Components. We still have to add the support for searching for a file/reg key/etc. and put the result in a property which can then be used in a condition.

Also, the Custom Actions are sequenced in a fixed place right now, and we will change that into customizable moments.

Best regards,
Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JTaylor
Posts: 3
Joined: Wed Jul 14, 2004 3:36 pm

Thanks for your reply

It would be great if these features would show up in your next version 1.8 :D

Thank you.
J

Return to “Common Problems”