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

Need Help with XML in InstallScript MSI

Alright, I've been staring at this for the past day... and I still can't figure it out.

I want to update and or create an XML document that keeps track of the end-user's selections during installation. I am using InstallScript MSI. Are there any InstallScript code that allows me to make changes and add elements to an XML, like how the "SetProfString" function is for config files.

I've went through all the documentations, tried the so called InstallScript text substitution method, with no luck. All I want is to pass on the strings and values I gathered from within my InstallScript and plop them into the XML document under the correct key.

Any help would be greatly appreciated. Thanks!

-Pizzaman
Labels (1)
0 Kudos
(3) Replies
Christopher_Pai
Level 16

You shouldn't need any CA's to make your XML changes. Just use the XML Changes view in InstallShield and author the correct XPath relationships and InstallShield's built in custom actions will update the XML document for you.
0 Kudos
Pizzaman
Level 3

Thanks for the tip.

When I am in Basic MSI mode, I am able to use the [MY_PUBLIC_PROP] features to access the text fields.

Which leads to another issue, sometimes the fields do not update on the xml sheet when I run the application again. Instead, it would put another row of the same entry!











Notice the first 2 lines, shouldn't it overwrite the first? Or am I getting this whole xml thing wrong?

Also, reading from that file and automatically populating the text fields upon next use is my other problem. I am using the "System Search" method of assigning an element value to a variable within an XML file. But it is not working. When I use that variable to populate the textfield... it defaults back default value.

But anyway, that above is all in Basic MSI mode. I tried to perform the same methods in InstallScript MSI mode and I cannot reproduce the method of putting public properties into the xml.

Also another quick question. I know how to edit what the dialog buttons do in InstallScript, how do I script what the buttons and things do in Basic MSI?!

Sorry for the long drawn out problem.

-Pizzaman
0 Kudos
Christoph
Level 8

Go to the dialog editor and click on the behaviour section of a certain dialog. Go to the events tab of a certain button on your dialog. You can create a DoAction and set as argument the Custom Action that you want to call. You need also to specify on which condition the CA needs to be executed.

eg. NEXT button

DoAction CA_ValidateHostName 1
0 Kudos