This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Conditional Install if a file exists
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 25, 2008
02:48 PM
Conditional Install if a file exists
I have been struggling with this one a little bit. What would be the correct syntax for a condition NOT to install a component if a particular file already exists in the System Folder?
(9) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 25, 2008
03:11 PM
If you have a system search that sets FOUND_THE_FILE if the file exists, you can use Not FOUND_THE_FILE to detect that the file is absent.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 29, 2008
10:07 AM
RobertDickau,
I have searched Help for "FOUND_THE_FILE" and the response is "No Topics Found". Can you tell me what this is and how to use it?
I have searched Help for "FOUND_THE_FILE" and the response is "No Topics Found". Can you tell me what this is and how to use it?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 30, 2008
09:03 AM
When you set up a system search (in the System Search view), you give MSI the name of a public property (one with an all-caps name) to fill in if the file is found. FOUND_THE_FILE was just an example; you can pick any property (say, MYPROP) you want, and then use Not MYPROP as the negation...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2008
08:25 AM
hi,
I tried to create a "new feature" -> create "new component" -> add some files to the component and then set the condition to "Not FOUND_FILE". Also I createt a system search which searches for the file "test.txt" and if the file is found write what ever in the "FOUND_FILE" property.
Before this I createt the property "FOUND FILE" by using "Property Manager -> New Property".
But it dosen't work. Is that the way you meant robert? Could you be so polite to describe more details?
Thank you very much indeed.
I tried to create a "new feature" -> create "new component" -> add some files to the component and then set the condition to "Not FOUND_FILE". Also I createt a system search which searches for the file "test.txt" and if the file is found write what ever in the "FOUND_FILE" property.
Before this I createt the property "FOUND FILE" by using "Property Manager -> New Property".
But it dosen't work. Is that the way you meant robert? Could you be so polite to describe more details?
Thank you very much indeed.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2008
08:35 AM
The steps you listed sound correct: create a system search that populates FOUND_FILE, create a component with condition "Not FOUND_FILE".
It's not necessary to create FOUND_FILE beforehand, so you might delete that from the Property Manager view; as a test, if you place a text field containing [FOUND_FILE] on the InstallWelcome dialog box, does it appear that the search succeeds?
It's not necessary to create FOUND_FILE beforehand, so you might delete that from the Property Manager view; as a test, if you place a text field containing [FOUND_FILE] on the InstallWelcome dialog box, does it appear that the search succeeds?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2008
08:52 AM
I tried both, to create the property "FOUND_FILE" and not to create it. Nothing worked.
I just put a text object on the InstallWelcome dialog. But nothing appears in it, as if the search didn't start or something. I'm going mad 😞
I just put a text object on the InstallWelcome dialog. But nothing appears in it, as if the search didn't start or something. I'm going mad 😞
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2008
09:02 AM
Don't go mad yet --- what are your system search settings? Perhaps try a simple search first (look for notepad.exe in [WindowsFolder] and see what the search property contains afterward) to get the feel of it?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2008
09:23 AM
Strewth! I found my mistake. I tried to find a test.txt but didn't recognize that file extentions where disabled, so the file was text.txt.txt, stupid me! So thank you very very much robert. Everything works as it should.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2008
09:45 AM
I'm glad it turned out to be something simple---thanks for posting the resolution!