cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
paulied
Level 3

How do I update xml connection string with input from user at installation time?

Hi,
In my installation I prompt the user for server IP.
How do I put that information into an xml file?
I tried using the XML File Changes feature but I found it confusing and difficult to use.
Below is the content of the xml file I'm using. I want to replace (local); with the server IP.

Any help will be much appreciated.



-
true
false
SQLServer
Data Source=(local);Initial Catalog=DashboardLibrary;Trusted_Connection=True;
db_schema
.\Schema\DashboardLibrary
Labels (1)
0 Kudos

(2) Replies
DebbieL
Level 17

What project type are you using? What did you try in the XML File Changes view?

The XML File Changes view requires some knowledge of how to write XPath expressions. If you are not familiar with XPath, you may want to try the Text File Changes view, assuming that you are using a Basic MSI or InstallScript MSI project. Here's some more information:
Using Windows Installer Properties to Dynamically Modify Text Files

For using the XML File Changes view, here are a few topics that might be helpful:
Using XPath Expressions to Find XML Data in an XML File
Using Windows Installer Properties to Dynamically Modify XML Files
Using InstallScript Text Substitution to Dynamically Modify XML Files
0 Kudos
paulied
Level 3

DebbieL wrote:
What project type are you using? What did you try in the XML File Changes view?

The XML File Changes view requires some knowledge of how to write XPath expressions. If you are not familiar with XPath, you may want to try the Text File Changes view, assuming that you are using a Basic MSI or InstallScript MSI project. Here's some more information:
Using Windows Installer Properties to Dynamically Modify Text Files

For using the XML File Changes view, here are a few topics that might be helpful:
Using XPath Expressions to Find XML Data in an XML File
Using Windows Installer Properties to Dynamically Modify XML Files
Using InstallScript Text Substitution to Dynamically Modify XML Files


Hi,
I'm using an installscript project. I tried importing the xml file but then I didn't know what to do with it or get the user input into the right node.
Thanks
Paulied
0 Kudos