This script removes un-needed script mappings in an IIS 5.0 Web server. Script mappings are the ISAPI DLLs or EXE ' s that execute webpages through IIS. This script requires administrator access, and ADSI 2.5 files. This script queries the IIS metabase and returns a multi-valued array list. The script loops through the array and build a new set of script-mappings. We assume no responsibility for someone trying this script and any damages to. occur (Try at own risk!). Testing on a development machine are strongly recommend before running in a production environment. Backing up the metabase is also strongly recommended.
This is the code
Dim Strext
Dim myvalue
Dim strnothing
Dim strbuild
Dim i
Dim ivalue
Set myvalue = GetObject ("Iis://localhost/w3svc/1/root")
' Returns an array multi valued list
' Puts the values in a local array variable myarray
MyArray = Myvalue.get ("scriptmaps")
' Loops through building a string
' Based on myarray list of values
For i = 0 to UBound (myarray)
Ivalue = InStr (MyArray (i), ",")
Strext = Left (MyArray (i), iValue-1)
Select Case Strext
Case ". idq", ". Ida", ". Printer", ". Htw", ". htr"
' Builds a bogus string of un-needed mappings
strnothing = strnothing & MyArray (i)
Case Else
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.