Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Replacing a value in XML

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,63299
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Replacing a value in XML
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Replacing a value in XML - 8/11/2008 2:03:58 AM   
  dslider

 

Posts: 49
Score: 0
Joined: 1/23/2008
Status: offline
I am trying to write a script that will automate the locking down of IIS on our servers.

What I need to do is change the MaxConnections from 1000 to 100 while keeping all the other information intact. I just need an example of how to do this then i will be able to go from there.


      


There is another element call <IIsWebServer> but it doesnt contain the same information. So I dont want it to change the information in there....


      


If I am confusing let me know I will try and explain better.
 
 
Post #: 1
 
 RE: Replacing a value in XML - 8/11/2008 2:16:01 AM   
  dm_4ever


Posts: 2670
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
Do a search for XMLDOM since that would probably be the safest way for you to modify the XML file.  Where is this file stored on a server so I can see what it looks like in its entirety?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to dslider)
 
 
Post #: 2
 
 RE: Replacing a value in XML - 8/11/2008 2:22:22 AM   
  dslider

 

Posts: 49
Score: 0
Joined: 1/23/2008
Status: offline
C:\WINDOWS\system32\inetsrv\MetaBase.xml

I will look into xmldom now

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: Replacing a value in XML - 8/12/2008 1:33:34 AM   
  nilpo1

 

Posts: 21
Score: 0
Joined: 1/22/2006
Status: offline
Typically, editing XML documents is very easy.  However, changing this particular value is a little tricky because you're not changing the value of an XML element, but rather the value of one of its attributes.  In any case, here's the code to do the trick.  Cheers.

      

_____________________________

Scripting problems? Windows questions? Ask the Windows Guru!

(in reply to dslider)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Replacing a value in XML Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts