Advanced Installer,
Environment: Advanced Installer 15.3 Enterprise. Installer written on Win10 computer. Install Parameters demand that the package installs onto a computer higher than (not inclusive of) Windows XP.
I am trying to use a property as a true/false indicator of if a file exists on the target machine. This allows me to use it as a conditional in a File Copy/Move Operation. I have a file saved onto their system that I do not wish to overwrite, and doing a conditional based off a public property is the only way I know how to do this. If it were a regular installed file, I could use the Do Not Overwrite flag with a condition of 1 ( https://www.advancedinstaller.com/user- ... s-tab.html ) but I do not have that option ( https://www.advancedinstaller.com/user- ... ialog.html ). The file installed via a Permanent attribute component ( https://www.advancedinstaller.com/user- ... rties.html ) and I do not wish to overwrite it, even if there currently is no installation, so I cannot use OLD_PRODUCTS.
I am having issue as the only way I know how to do this is to use Custom Behavior > Search window > New File Search > Path: C:\ProgramData\Company\ProductLine\Product\CommonName.txt
This path saves to the .aip as <ROW Signature_="FileSearchSign" Path="[CommonAppDataFolder]" Depth="3"/>, and the GUI also reveals that it does not have any more information.
My trouble is that my ProductLine directory has ProductA\CommonName.txt and ProductB\CommonName.txt, and so just looking at the depth from CommonAppDataFolder will not work.
I have thought about having the conditional be NOT (MY_PROP = "C:\ProgramData\Company\ProductLine\Product\CommonName.txt") but 1) I'm doing this expression wrong and 2) this still means that the search could find the wrong file, and stop looking for the correct one, and so the wrong path will be returned.
My old installer was written years before I joined the company and uses a VBScript in InstallShield. I was really hoping to get away from a VBScript if possible.
Never Overwrite attribute, as I understand it, fails my use case because I am not guaranteed that past installations will have this flag.
The links viewtopic.php?t=9510 (File Search property) and https://www.advancedinstaller.com/user- ... rties.html seemed to be the closest related topic, along with many others have been invaluable as I figure out how to reverse engineer this InstallShield installer that I have, but alas I could not figure out this very specific case.