Install Component or Feature based on existence of directory
I have been given an ini file to incorporate into my Sybase 12.5.2 package I recently built. A specific directory must exist in order for this file to be copied. My idea was to compress the ini file into the msi (in it's own component), create a separate feature for the component and then create a custom action based on whether the property (which I set as the filepath) exists (install feature) or doesn't (no feature). The only problem is I'm not really too sure how to phrase the install condition for the existence of this property. If anyone can provide some assistance I would appreciate it. Thank you.
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
sreedharko
13 years ago
Posted by:
jamsek19
17 years ago
Hello.
I will do this way:
1. I create a property which value should have that directory. Default value is empty.
2. In App search Table I add a line which checks or search for that folder and in case the folder exists fills previously created property.
3. Under Condition attribute of component I write a condition that property created under point 1. must not be empty
Example using ORCA:
1.
Property table: Property: SRCHFOLDER, Value: <leave empty (not 0!)>
2.
AppSearch table: Property: SRCHFOLDER, Signature: NewSignatureX
DrLocator table: Signature: NewSignatureX, Parent: <parent of searched folder (should be empty in case of exact search)>, Path: <searched folder>, Depth: 1 (1 is for exact search, otherwise add more levels)
Signature table: Signature: NewSignatureX, Filename: empty (searching for folder)
3.
Component table: in a line with desired component put SRCHFOLDER<>"" in a Condition column.
I will do this way:
1. I create a property which value should have that directory. Default value is empty.
2. In App search Table I add a line which checks or search for that folder and in case the folder exists fills previously created property.
3. Under Condition attribute of component I write a condition that property created under point 1. must not be empty
Example using ORCA:
1.
Property table: Property: SRCHFOLDER, Value: <leave empty (not 0!)>
2.
AppSearch table: Property: SRCHFOLDER, Signature: NewSignatureX
DrLocator table: Signature: NewSignatureX, Parent: <parent of searched folder (should be empty in case of exact search)>, Path: <searched folder>, Depth: 1 (1 is for exact search, otherwise add more levels)
Signature table: Signature: NewSignatureX, Filename: empty (searching for folder)
3.
Component table: in a line with desired component put SRCHFOLDER<>"" in a Condition column.
Posted by:
danr29
17 years ago
Posted by:
sreedharko
13 years ago
Hi ,
I am in the same line with one of the application.
The condition is i have a set of files to be installed if the files (old version) are already exist in the machine.
I tried to use SYSTEMSEARCH for a file with a property and set the component-condition with the property as (TEST = 1).
this works when the file is not present on the build.
But is fails to overrite the old file if it is present.
Could somebody pls suggest on this to get rid of the problem.
thanks in advance.
I am in the same line with one of the application.
The condition is i have a set of files to be installed if the files (old version) are already exist in the machine.
I tried to use SYSTEMSEARCH for a file with a property and set the component-condition with the property as (TEST = 1).
this works when the file is not present on the build.
But is fails to overrite the old file if it is present.
Could somebody pls suggest on this to get rid of the problem.
thanks in advance.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.