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: TextSubSetValue and XML files
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Dec 22, 2009
10:10 AM
TextSubSetValue and XML files
Hi All...
Install Script project...
I've seen others having this problem in the forum archives, but I havent found a resolution.
I've set up a string to have some "stub-value" and associated that with an XML change to a web.config file - one that's part of the install.
Somewhere in the middle of OnFirstUIBefore I call TextSubSetValue to change the value of the string.
But after the install, the web.config has that "stub-value" - it appears that TextSubSetValue didnt take or didnt happen at the right time.
Any thoughts?
Many thanks -- Curt
Install Script project...
I've seen others having this problem in the forum archives, but I havent found a resolution.
I've set up a string to have some "stub-value" and associated that with an XML change to a web.config file - one that's part of the install.
Somewhere in the middle of OnFirstUIBefore I call TextSubSetValue to change the value of the string.
But after the install, the web.config has that "stub-value" - it appears that TextSubSetValue didnt take or didnt happen at the right time.
Any thoughts?
Many thanks -- Curt
(4) Replies
‎Dec 22, 2009
12:02 PM
Assuming the reference in the XML File Changes view to the textsub is in the format this should work correctly in pure InstallScript projects with XML attribute values or element content (I don't recall off-hand whether element names can use textsubs).
Are you able to reproduce this behavior in a sample project? If so can you attach the sample .ism and setup.rul files?
Are you able to reproduce this behavior in a sample project? If so can you attach the sample .ism and setup.rul files?
‎Dec 22, 2009
12:28 PM
‎Dec 22, 2009
12:38 PM
I've attached a modified version of the project that should work correctly for you. The XML attribute values to be replaced should reference the textsubs that contain the desired values (these references do need <> around the textsub name, see the attribute values in the XML file changes for elements NewXmlElement/NewXmlElement1). I also modified the script slightly to set different textsubs for each attribute value and to show that <> are not required for TextSubSetValue.
‎Dec 22, 2009
01:11 PM
Oh I see... It comes down to when the is evaluated - design time versus runtime. Many thanks, Josh!