Hello Steve,
Unfortunately, I am afraid we do not have predefined support for your scenario (i.e. to check if a piece of text exists in a file).
You can still achieve what you want. However, a custom approach will be needed.
First of all, we will need a custom action that will achieve what you want (open a file and look for the piece of text in it). Based on the results, this custom action will need to set a property (e.g. if the text exists, set MY_PROP to "1", else set it to "0"):
How to get/set installer properties using custom actions
Now, if you go to "Files and Folders" page and double click on your "Text File Update" operation, you can notice that this will be run on a component install. Basically, if the component is installed, the operation will be run. Therefore, conditioning the component will further condition the run of the text file update.
What we will need here is a dummy component (the dummy component can be created by adding a dummy file to your project - e.g. an empty text file) whose installation can be conditioned by the result of our custom action.
After creating the dummy component, you can go to
"Organization" page --> under
"Installation Behavior" --> select
"Not installed" by default and
"Installed if:" to your condition. In the sample I have give above, we will need the
MY_PROP = "0" condition (because we need to execute the text file update only if the text is not present within the file)
Now that we have conditioned the installation of the component (therefore the file update operation), you can go to
"Files and Folders" page --> double click on the text file update --> under
"Install" section, expand the
"Component" drop-down and select the dummy component.
Hope this helps.
Best regards,
Catalin