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 Text File Update?
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
‎Feb 14, 2013
10:32 AM
Conditional Text File Update?
Hi All,
Is there a way to do a conditional update of a text file? For example, I have a text file that has a line in it that is "C:\Program Files (x86)\...". Can I do something where if the OS is 32-bit to modify that line to be "C:\Program Files\..." instead?
Thanks as always,
Brian
Is there a way to do a conditional update of a text file? For example, I have a text file that has a line in it that is "C:\Program Files (x86)\...". Can I do something where if the OS is 32-bit to modify that line to be "C:\Program Files\..." instead?
Thanks as always,
Brian
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 14, 2013
08:08 PM
Hello.
Why don't you use [Text File Changes View]?
Text File Changes View
http://kb.flexerasoftware.com/doc/Helpnet/installshield19helplib/helplibrary/TextFileChangesView.htm
Specifying Search-and-Replace Criteria for a Text File Change
http://kb.flexerasoftware.com/doc/Helpnet/installshield19helplib/helplibrary/TextFileChanges-SrchRplc.htm#ConfiguringTargetSystem_814688173_TextFileChanges-SrchRplc
And I guess you can use Windows Installer Property INSTALLDIR as [INSTALLDIR].
If you write [INSTALLDIR], then that string will be replaced to actual install folder.
Why don't you use [Text File Changes View]?
Text File Changes View
http://kb.flexerasoftware.com/doc/Helpnet/installshield19helplib/helplibrary/TextFileChangesView.htm
Specifying Search-and-Replace Criteria for a Text File Change
http://kb.flexerasoftware.com/doc/Helpnet/installshield19helplib/helplibrary/TextFileChanges-SrchRplc.htm#ConfiguringTargetSystem_814688173_TextFileChanges-SrchRplc
And I guess you can use Windows Installer Property INSTALLDIR as [INSTALLDIR].
If you write [INSTALLDIR], then that string will be replaced to actual install folder.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 04, 2013
11:59 AM
weakness wrote:
Hello.
Why don't you use [Text File Changes View]?
Text File Changes View
http://kb.flexerasoftware.com/doc/Helpnet/installshield19helplib/helplibrary/TextFileChangesView.htm
Thanks, weakness! I see the text file changes but how can I make it change only if a certain condition is met. For example, I have a batch file that has C:\Program Files (x86)\... in it. I'd like to have the installer change it to C:\Program Files\... before I have a custom script launch. Otherwise I'll get an error.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 08, 2013
07:57 AM
I think the text file changes are associated to a component.
you can condition the component and then in turn takes care of the text file changes
you can condition the component and then in turn takes care of the text file changes
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2013
05:13 AM
rrinblue22 wrote:
I think the text file changes are associated to a component.
you can condition the component and then in turn takes care of the text file changes
I concur, this is the best way to make conditional changes to text/XML/ini files.