How to check OS installed driveletter settings own setup XML

Este sección contiene programas, extras, plugins, tutoriales y demas sobre Setup Factory.
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
How to change only use SetValueXML
<installerDefaults pathToAllUsers="C:\ProgramData\mycompany">
Help me thanks :SOS:

pathToAllUsers is not value , is attribute , use XML.SetAttribute