Hi everybody !

I'm new in packaging, so I have a basic question :

How can I condition the installation of a component using CAs ?
I read that CAs used conditions of an install action (for example $ComponentName = 3 could be a condition of a CA) but can't be conditions for an install action (?)

I would like, for example, search for a file installed on the computer, and if I find it, I would like to install a specific component. (or uninstall something, etc...)

Can I do that with CAs ? Or using another methods ?

Thank you !

EDIT : I think it could be done setting the state INSTALLSTATE_LOCAL/_ABSENT/.... of the component/feature I want... no ?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Babric,

You should try to use an AppSearch. This will look for the file on the PC and set the location to a property.
Then in the CA you can just put the property name as the condition. Since the Conditions will use a boolean evaluation, if the Property is present then the CA install condition is TRUE, else it will be FALSE.

Here is a good link for a good example:
Search for IE Installed
Answered 07/21/2005 by: TomB
Orange Belt

Please log in to comment
0
Thanks for your link, I read it, but I knew how to do that.

I your example, an error popup is shown, but I don't want to STOP the install, but I want the result of the AppSearch to be a condition of installing or not some components.

Using IE5 example, I wouldn't show an error popup (stopping the installation) but I would enable the installation of IE5 included in my package.
If IE5 is already installed on the target, I would disable its installation.

(I hope this is not explained in your link, because I don't speak and read english very well)
Answered 07/21/2005 by: babric
Senior Purple Belt

Please log in to comment
0
The IE sample is just an example, you can use that process up to the Custom Action. You do not need CA 19 do display an error message, you can just insert your Custom Action at this point or if you do not need a cutom action skip it.

When adding a condition to the Custom Action in the Sequence table or on a component, instead of using the Condition:

Not IE55FOUND And Not Installed

You would use:

IE55FOUND

This would make the Custom Action or Component require that the property, in this case the IE55FOUND, contain something.

Hope that helps.
Answered 07/21/2005 by: TomB
Orange Belt

Please log in to comment
0
you can just insert your Custom Action at this point

What I would like to know is how to build THIS Custom Action :-)
I need a CA which allow or not the installation of a component of my package, without stopping the installation process.
I know what can I use as condition to launch this CA, but What I want to know is the CA that I could use to allow (or not) the installation of my component.

For example, if the user has the file BLABLA.txt on his computer, I install BLIBLI.txt. If not, I install BLUBLU.txt ...

hope I explained it clearly :-)
Answered 07/21/2005 by: babric
Senior Purple Belt

Please log in to comment
0
Babric,

You do not need a custom action. If you look in the Component Table of an MSI there is a Condition Column. In that column is where you would put the PROPERTY.

For example:
Use the Article above and create an AppSerch for your BLABLA.txt file. Asgin it to a Property such as FILEFOUND.
Do not create any Custom Action.

Then add 2 Components to your MSI.

Component1
Add the file BLIBLI.txt, and in the Condition Column of the Component table put "FILEFOUND".

Component2
Add the file BLUBLU.txt and in the Condition Column of the Component table put "NOT FILEFOUND".

This way if the file is found BLIBLI.txt will be installed, and if not BLUBLU.txt will be installed. This is the same method we use if we need to install a file only on Win2k or Winxp.
Answered 07/21/2005 by: TomB
Orange Belt

Please log in to comment
0
TomB,

Ok, sorry I didn't understand the first time :-/

Thanks !
Answered 07/21/2005 by: babric
Senior Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity