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: Editing xml file during installation
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 15, 2016
05:42 PM
Editing xml file during installation
So I have a configuration xml file that is set to be installed with my software. The xml file has some fields, for example the web address of a backend server.
I want to be able to prompt for user input to get the information during the installation to fill out these xml fields.
I'm trying to accomplish this in a basic msi project. Any insights or suggestions on how to complete this would be greatly appreciated.
Edit:
So I've made some head way, I think I will accomplish this by creating a custom dialog. However I'm not sure how to get the information that is inputted in a dialog text field into my xml.
I want to be able to prompt for user input to get the information during the installation to fill out these xml fields.
I'm trying to accomplish this in a basic msi project. Any insights or suggestions on how to complete this would be greatly appreciated.
Edit:
So I've made some head way, I think I will accomplish this by creating a custom dialog. However I'm not sure how to get the information that is inputted in a dialog text field into my xml.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 16, 2016
12:36 PM
Set the edit control in your dialog to have some know Property: and use ALL UPPERCASE for that Property so it is a Global Property - makes it survive between the UI and Execute sequence this way.
Then in the "XML File Changes" go to your file and on the Advanced tab you can specify the Attributes or Elements you wish to change and Include your new Property in the appropriate location to do your text substitution.
Maybe helps you a little further along?
Chad
Then in the "XML File Changes" go to your file and on the Advanced tab you can specify the Attributes or Elements you wish to change and Include your new Property in the appropriate location to do your text substitution.
Maybe helps you a little further along?
Chad
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 16, 2016
01:32 PM
Thanks a bunch Chad! That did the trick!
So for anyone in the future here is what I did:
[LIST=1]
Create a custom dialog (Under User Interface/Dialogs)
Create dialog with edit fields. Name them as you like, but properties of each should be all uppercase (ex. APIURL or MACHINENAME)
In text file changes or XML file changes, create a change as you would normally
When trying to get your text from the text field, write it as such: [EXAMPLEPROPERTY] (Using [] gets the value)
This stack overflow post helped a bit when it came to editing and replacing text:
http://stackoverflow.com/questions/6783585/modifying-config-file-while-installing-with-installshield-2011
Then finally you need to place your dialog into your installer. You can do this under Behavior and Logic -> Custom Actions and Sequences
So for anyone in the future here is what I did:
[LIST=1]
This stack overflow post helped a bit when it came to editing and replacing text:
http://stackoverflow.com/questions/6783585/modifying-config-file-while-installing-with-installshield-2011
Then finally you need to place your dialog into your installer. You can do this under Behavior and Logic -> Custom Actions and Sequences