I build an installer with Basic MSI Project in InstallShield 2010.
My setup has custom dialogs with inputs like textBoxes. Each TextBox has associated a variable with a default value. The package kit contain also an .xml file wich is generated by installer and has in it the values setted in wizard in a specific path. That works very well.
The problem is I have a lot of this textBoxes and a lot of steps. I want to add the possibility for a user to browse an .xml file in one of the wizard's steps and then skip all the steps to insert data in textboxes.
I guess that inside my installer's project I have to set the default values for each variables with a value or with a path (I know exactly where the value I need is in xml) in condition that the user points to an xml.
I will ignore for now if the browsed xml has not the same template I need, let's say that I will find the paths.
The question is how I set the variables in my project in case that xml file is browsed?
Latest edit:
my xml looks like:
<Settings>
<SiteNames>
<Setting property="prop1">value1</Setting>
<Setting property="prop2">value2</Setting>
</SiteNames>
</Settings>
and my .js is:
function setValues(){
var xmlPath = Session.Property("IS_BROWSE_FILEBROWSED");
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = "false";
xmlDoc.load(xmlPath);
var elem = xmlDoc.getElementsByTagName("Setting");
for (var i=0; i<elem.length; i++){
Session.Property(elem[i].getAttribute("property")) = elem[i].childNodes[0].nodeValue);
}
}
It is something wrong? my property values are not changing..
The script is running when a button is pressed. I don't know what I have to do for this to work.
Thanks for your time.