/build/static/layout/Breadcrumb_cap_w.png

scripting to change ip address in xml file

Hi

i am packaging an application which hard codes an xml file with my host ip address, i need this to be taken from each machine it is on and not keep my host ip for every machine that installs the software as the program requires the host machines ip.

can anyone advise of a script which will dynamicaly change the ip address in this xml file as i cant find anything anywhere!

thanks

 


0 Comments   [ + ] Show comments

Answers (3)

Posted by: dunnpy 11 years ago
Red Belt
2

A quick Google search found loads of hits for editing XML with vbscript.

This one gives a good example, you'll just need a bit of code to grab the client IP address from your target machine so that it can be written to the XML file.

http://community.spiceworks.com/scripts/show/578-edit-xml-file-with-vbscript

Hope that helps,

Dunnpy


Comments:
  • i couldnt find anything that would do the job when i searched, found two but they didnt work, thanks for this, im not been lazy and just posting for an easy life i have looked for something first. - keane2012 11 years ago
Posted by: keane2012 11 years ago
Brown Belt
0

Thanks for this

we have tried using it and it does the job to a degree but hard to work out what it contains within the example xml file so hard to change to suite

thanks anyway

Posted by: keane2012 11 years ago
Brown Belt
0

we have used this, there is an issue where by its taking away the final " from the ip address so stumped again, thanks anyway for your hellp

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ