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

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
Level 17

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