Hi,
I have a program that generates configuration settings in an XML file. However with what little knowledge I have of XML the file does not appear to be formatted correctly. Anyhow the problem is I have to change the server field so the client looks at the new server. I looked at this thread: thread329-1225036 but I am not changing the entire element, just part of it. I tried treating it as text but the file did not save correctly. Anyhow here is the file:
<?xml version="1.0" encoding="UTF-16"?>
<AgentSettings Version="1.0" AgentGuid="60C1E25D-6F3A-4664-9662-F3A2E875FE56" AgentMagicNumber="gvE1z4hx77AwYhMhM7AdDCMcnMJ24NItTtpCfugo67ELHdqPvIMpYuvXNvzWa7sqGfVJcZUQcsIRFB9B/sUbtQ==" AgentPort="18086" PolicyGuid="2415BD00-AF90-4DCB-A5ED-646D3C7D435A" SiteSpecificMagicNumber="UTd2r8pUm46RTQNr2xHQkxEgKOkYqjTnIjlXLaI9uv2KenNWDjyBi8cEkCH0zCQU3rNyV4JgAukLnfbHUGCEsQ==" PolicyServiceFirstAuthenticationFailureTime="1969-12-31T16:00:00" PolicyServiceLastContactTime="2008-07-18T09:17:19" LastKnownGoodPolicyServiceMachineName="Server1" LastKnownGoodPolicyServicePort="18082" LastAgentSoftwareUpdateCheckTime="1601-01-01T00:00:00" LastThreatDbUpdateCheckTime="2008-07-17T13:19:52" NextScheduledQuickScanTime="2008-07-18T19:00:55" NextScheduledDeepScanTime="2008-07-19T19:00:55" LastQuarantineMaintenanceTime="2008-07-17T13:19:52" LastScanHistoryMaintenanceTime="2008-07-17T13:19:52" NeedNewPolicy="false" NeedSoftwareUpdate="false" NeedThreatDbUpdate="false" IsLicenseValid="true"/>
So I want to change Server1 to Server2 with a VBScript.
I have a program that generates configuration settings in an XML file. However with what little knowledge I have of XML the file does not appear to be formatted correctly. Anyhow the problem is I have to change the server field so the client looks at the new server. I looked at this thread: thread329-1225036 but I am not changing the entire element, just part of it. I tried treating it as text but the file did not save correctly. Anyhow here is the file:
<?xml version="1.0" encoding="UTF-16"?>
<AgentSettings Version="1.0" AgentGuid="60C1E25D-6F3A-4664-9662-F3A2E875FE56" AgentMagicNumber="gvE1z4hx77AwYhMhM7AdDCMcnMJ24NItTtpCfugo67ELHdqPvIMpYuvXNvzWa7sqGfVJcZUQcsIRFB9B/sUbtQ==" AgentPort="18086" PolicyGuid="2415BD00-AF90-4DCB-A5ED-646D3C7D435A" SiteSpecificMagicNumber="UTd2r8pUm46RTQNr2xHQkxEgKOkYqjTnIjlXLaI9uv2KenNWDjyBi8cEkCH0zCQU3rNyV4JgAukLnfbHUGCEsQ==" PolicyServiceFirstAuthenticationFailureTime="1969-12-31T16:00:00" PolicyServiceLastContactTime="2008-07-18T09:17:19" LastKnownGoodPolicyServiceMachineName="Server1" LastKnownGoodPolicyServicePort="18082" LastAgentSoftwareUpdateCheckTime="1601-01-01T00:00:00" LastThreatDbUpdateCheckTime="2008-07-17T13:19:52" NextScheduledQuickScanTime="2008-07-18T19:00:55" NextScheduledDeepScanTime="2008-07-19T19:00:55" LastQuarantineMaintenanceTime="2008-07-17T13:19:52" LastScanHistoryMaintenanceTime="2008-07-17T13:19:52" NeedNewPolicy="false" NeedSoftwareUpdate="false" NeedThreatDbUpdate="false" IsLicenseValid="true"/>
So I want to change Server1 to Server2 with a VBScript.