Hello.
I am new to the forum and not advanced in SF, so I would appreciate your help very much.
What I need to do is to insert a program path into my XML file after the install. Although I have already searched quite a lot I am having troubles with that. It works fine with INIFile.SetValue but somehow I am unable to repeat this with XML. Here is what I need to do (at least as far as I have understood):
1. Search for the installed XML file after the install:
XML.Load(SessionVar.Expand("%FolderA%".."\\AAA\\ex e.xml"));
2. Insert my product path saved in a variable:
XML.SetValue("Section1/Section2/Element", "%FolderA%\\BBB\\Program.exe", false);
3. Save the changed XML file:
XML.Save("%FolderB%".."\\exe.xml");
No problems with step 1. In step 2 I am unable to insert the path, which is inside the %FolderA% variable, into the XML file. It simply shows as %FolderA%, not as a correct path. In step 3 same problems with setting correct variables to be able to save the file into the correct location...
Finally I was even trying to save my file on my desktop using:
SessionVar.Set("%Desktop%", "C:\Users\XNOTE\Desktop" );
Desktopx = SessionVar.Expand("%Desktop%");
XML.Save("Desktopx".."\\exe.xml");
...and obviously it did not work.
Thank you in advance for any help!
I am new to the forum and not advanced in SF, so I would appreciate your help very much.
What I need to do is to insert a program path into my XML file after the install. Although I have already searched quite a lot I am having troubles with that. It works fine with INIFile.SetValue but somehow I am unable to repeat this with XML. Here is what I need to do (at least as far as I have understood):
1. Search for the installed XML file after the install:
XML.Load(SessionVar.Expand("%FolderA%".."\\AAA\\ex e.xml"));
2. Insert my product path saved in a variable:
XML.SetValue("Section1/Section2/Element", "%FolderA%\\BBB\\Program.exe", false);
3. Save the changed XML file:
XML.Save("%FolderB%".."\\exe.xml");
No problems with step 1. In step 2 I am unable to insert the path, which is inside the %FolderA% variable, into the XML file. It simply shows as %FolderA%, not as a correct path. In step 3 same problems with setting correct variables to be able to save the file into the correct location...
Finally I was even trying to save my file on my desktop using:
SessionVar.Set("%Desktop%", "C:\Users\XNOTE\Desktop" );
Desktopx = SessionVar.Expand("%Desktop%");
XML.Save("Desktopx".."\\exe.xml");
...and obviously it did not work.
Thank you in advance for any help!
Comment