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
- :
- InstallScript Project: SQLServerSelectLogin to XML File Changes ?
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
Sep 05, 2008
02:14 AM
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
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
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 05, 2008
03:37 PM
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.