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
- :
- XPath and Installscript...
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
Mar 27, 2013
03:13 PM
XPath and Installscript...
Hello All,
I've been struggling with this for two days now. This ability is barely documented and it's very difficult to get any feedback.
Essentially, i'm trying to replace some values in an XML file:
The XML file:
Nothing is happening. Any ideas? Please advise, i'm going insane over here... It's scheduled after the files are installed and it's running next to another custom action which is working. So i know it's not a scheduling problem. And i cannot use XMLFileChanges there is to much logic behind what i need to do....
TIA!
I've been struggling with this for two days now. This ability is barely documented and it's very difficult to get any feedback.
Essentially, i'm trying to replace some values in an XML file:
function string FileStringReplacement(hMSI, sDestPath, sDestFile, sMachineDeviceName)
OBJECT oDoc, Lot;
NUMBER nvFileHandle, nvResult;
STRING svString, szResult, szPath, szFile, szReplace, strTempString;
begin
set oDoc = CreateObject("Msxml2.DOMDocument.4.0");
oDoc.async = FALSE;
oDoc.setProperty("SelectionLanguage", "XPath");
oDoc.load(sDestPath + sDestFile);
set Lot = oDoc.selectNodes("/Device/@Name");
Lot.attributes.getNamedItem("Value").value = sMachineDeviceName;
oDoc.save(sDestPath + sDestFile);
set oDoc = NOTHING;
end;
The XML file:
false
false
5
Datascope.DatascopeDevice
Datascope
Nothing is happening. Any ideas? Please advise, i'm going insane over here... It's scheduled after the files are installed and it's running next to another custom action which is working. So i know it's not a scheduling problem. And i cannot use XMLFileChanges there is to much logic behind what i need to do....
TIA!
(13) Replies