2 mensajes Página 1 de 1
My defaults XML file is
<?xml version="1.0" encoding="UTF-8"?>
<installerDefaults pathToAllUsers="C:\ProgramData\mycompany">
<databaseConnector>
<localDatabasePath>..\example.db3</localDatabasePath>
</databaseConnector>
<defaultLocales>
<installerDefaultLocale>en-US</installerDefaultLocale>
</defaultLocales>
</installerDefaults>

This highlited value is change drive letter with OS installed letter

local x = (String.SplitPath(_SystemFolder).Drive)
if x == "C:" then
XML.Load(SessionVar.Expand("C:\\mycompany\\myprodu cts\\installerDefaults.xml"));
XML.SetValue("installerDefaults", "pathToAllUsers=&quotC:\\mycompany\\myproducts&quo t", false);
XML.Save(SessionVar.Expand("C:\\mycompany\\myprodu cts\\installerDefaults.xml"));
elseif x == "D:" then
XML.Load(SessionVar.Expand("D:\\mycompany\\myprodu cts\\installerDefaults.xml"));
XML.SetValue("installerDefaults", "pathToAllUsers=&quotD:\\mycompany\\myproducts&quo t", false);
XML.Save(SessionVar.Expand("D:\\mycompany\\myprodu cts\\installerDefaults.xml"));
elseif x == "E:" then
XML.Load(SessionVar.Expand("E:\\mycompany\\myprodu cts\\installerDefaults.xml"));
XML.SetValue("installerDefaults", "pathToAllUsers=&quotE:\\mycompany\\myproducts&quo t", false);
XML.Save(SessionVar.Expand("E:\\mycompany\\myprodu cts\\installerDefaults.xml"));
else

end
Parsed in 0.003 seconds, using GeSHi 1.0.8.9


How to change only use SetValueXML
<installerDefaults pathToAllUsers="C:\ProgramData\mycompany">
Help me thanks :SOS:

pathToAllUsers is not value , is attribute , use XML.SetAttribute
2 mensajes Página 1 de 1

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado