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
- :
- Re: Replace variables in configuration files.
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
‎Dec 14, 2006
09:02 AM
Replace variables in configuration files.
All -
I'm new to installsheild and am a little confused. How can the installer replace variables in my applications configuration files with values entered in some input field at install time?
I thought installsheild would do this for me without having to write custom code?
Can anyone help with this?
Thanks
I'm new to installsheild and am a little confused. How can the installer replace variables in my applications configuration files with values entered in some input field at install time?
I thought installsheild would do this for me without having to write custom code?
Can anyone help with this?
Thanks
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 14, 2006
09:28 AM
You can use the Ascii File Update action to accomplish this!
So if you have a file you want to update with some values in a component, add the Ascii File Update Action, (AFUA), after it and for the ASCII File - you can use something like:
$P(ConfigFileBeanID.absoluteInstallLocation)/configfile
(You can use the shortcut action to get this value easily by adding a shortcut action and for the target, click the ellipses to the far right of the box and search for the config file in your component, select it and then cut and paste this target to your AFUA file name and delete the shortcut action!) You would then need to add the actions you wish to take for the AFUA!
You would basically need to add a Search Line/Text and then add a Replace Line/Text. You can use $V(VAR) for your searches and replacements!
Hope this helps!
Regards,
Tom
So if you have a file you want to update with some values in a component, add the Ascii File Update Action, (AFUA), after it and for the ASCII File - you can use something like:
$P(ConfigFileBeanID.absoluteInstallLocation)/configfile
(You can use the shortcut action to get this value easily by adding a shortcut action and for the target, click the ellipses to the far right of the box and search for the config file in your component, select it and then cut and paste this target to your AFUA file name and delete the shortcut action!) You would then need to add the actions you wish to take for the AFUA!
You would basically need to add a Search Line/Text and then add a Replace Line/Text. You can use $V(VAR) for your searches and replacements!
Hope this helps!
Regards,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 14, 2006
02:22 PM
Great, Thanks!
enanrum wrote:
You can use the Ascii File Update action to accomplish this!
So if you have a file you want to update with some values in a component, add the Ascii File Update Action, (AFUA), after it and for the ASCII File - you can use something like:
$P(ConfigFileBeanID.absoluteInstallLocation)/configfile
(You can use the shortcut action to get this value easily by adding a shortcut action and for the target, click the ellipses to the far right of the box and search for the config file in your component, select it and then cut and paste this target to your AFUA file name and delete the shortcut action!) You would then need to add the actions you wish to take for the AFUA!
You would basically need to add a Search Line/Text and then add a Replace Line/Text. You can use $V(VAR) for your searches and replacements!
Hope this helps!
Regards,
Tom
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)