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

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
Labels (1)
0 Kudos
(4) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

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?
0 Kudos
curtisdehaven
Level 3

Thanks, Josh. Good idea about a test project - that whole folder, minus Media is attached as a zip. The resulting XML file looks like...







The docs say that the "<" and ">" are optional though it isnt clear to me what the difference is. The test project includes both forms.

Curt
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

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.
0 Kudos
curtisdehaven
Level 3

Oh I see... It comes down to when the is evaluated - design time versus runtime. Many thanks, Josh!
0 Kudos