cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
elvinhau
Pilgrim

InstallScript Project: SQLServerSelectLogin to XML File Changes ?

Is there anyone able to use InstallScript project to replace variable in "XML File Changes" ?

In "XML File Changes", I have added a XML file with the following data:

Element Name: add[@name="MyConnection"]

Attribute: add[@name="MyConnection"]
Value: Data Source=[IS_SQLSERVER_SERVER];Initial Catalog=[IS_SQLSERVER_DATABASE];User ID=[IS_SQLSERVER_USERNAME];Password=[IS_SQLSERVER_PASSWORD]

In the script, I am able to use SQLRTGetConnectionInfo() to get the dialog data. But how to substitute those data into the variable [] above so that the xml file is updated correctly?

Currently, after installation, my xml file connectionstring is the same as below (extract):


I have also try "Text Replacement" in "SQL Scripts" but not working too.

A sample has been attached. Hope someone can give me a good advice.

Thanks

Elvin
Labels (1)
0 Kudos
1 Reply
hidenori
Pilgrim

Re: InstallScript Project: SQLServerSelectLogin to XML File Changes ?

InstallScript projects do not support Windows Installer properites. You need to use InstallScript Text Substitutions instead. Please see the Using InstallScript Text Substitution to Dynamically Modify XML Files KB article for more information.
0 Kudos