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

Where to put custom action to set destination of a component on runtime?

I have three components that should be installed either to folder A oder folder B.
Destination A should be used if the folder exists (e.g. C:\temp), otherwise the destination should be releative to my installdir (e.g. [INSTALLDIR]temp).

I use a system search that returns me the path and therefore sets a property [SHAREDDIR] with the expected value if the folder exists. Installation works fine.
But, if the folder does not exist, the system search returns a nullstring, therefore I need to set it.

So I created a custom action SetSharedDir:
Property Name: SHAREDDIR
Property Value: [INSTALLDIR]Shared
Install Exec Sequence: After AppSearch
Install Exec Condition: SHAREDDIR=INSTALLDIR

MigrateFeatureStates (UI seq) sets SHAREDDIR to INSTALLDIR, but the CA obviously does not run in exec seq. Where is my fault? Maybe I can use another condition based on AppSearch success, but I just don't know if there is any.
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

Please see the help for ICE12 for some action types and scheduling restrictions. Creating a run-time log file should help sort out what's going on, too.
0 Kudos
UNeverNo
Level 6

I read MS-help for CA 51. It says, that it has to run before CostFinalize.

Unfortunately CostFinalize itself sets INSTALLDIR and I need to set my SHAREDDIR according to the value of INSTALLDIR. So I need to do it after CostFinalize but can't do it because its forbidden/has no effect.

I tried Installscript-code as well, but it doesn't work either.

So how can I manage it :confused:
0 Kudos
RobertDickau
Flexera Alumni

A set-a-directory (type 35) action should do it; please see the help topic "Changing the Target Location for a Directory".
0 Kudos