I have a vbScript that runs and will be conditioned to run only on a Win 2K3 Server OS. My question is, how can/should I alter the following script so that I can maybe set AutoPlay properties to be used as conditions for other controls.....
Dim aWebSvcExtRestrictionList
Dim extension, sExt, Found
aWebSvcExtRestrictionList = Array()
Set IIsWebServiceObj = GetObject("IIS://localhost/W3SVC")
' Store original value:
aWebSvcExtRestrictionList = IIsWebServiceObj.WebSvcExtRestrictionList
'Troubleshooting...
' For each extension record,
'For Each i in aWebSvcExtRestrictionList
'MsgBox(i)
'Next
Found = 0
For extension = 0 to UBound(IIsWebServiceObj.WebSvcExtRestrictionList)
sExt = IISWebServiceObj.Get("WebSvcExtRestrictionList")(e xtension)
If (0 < (InStr(sExt, "Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.d ll"))) Then
Found = 1
If ("0" = Left(sExt, 1)) then
MsgBox "The ASP.NET v2.0 Web Service Extension needs to be enabled in " & vbCrlf & _
"Internet Information Services, Web Service Extensions for Adept " & vbCrlf & _
"Explorer to function properly!", 48, "Enable ASP.NET 2.0..."
elseif ("1" = Left(sExt, 1)) then
'Do nothing
Found = 1
'MsgBox "ASP.NET v2.0 Extension is enabled!"
else
MsgBox "Please check to ensure ASP.NET v2.0 Extension is enabled!"
end if
end if
Next
If Found = 0 then
MsgBox "It does not appear that the ASP.NET 2.0 Web Service Extension is present" & vbCrLf & _
"on this Server. Please add this extension in Internet Information Services," & vbCrLf & _
"Web Service Extensions by pointing to aspnet_isapi.dll in the following folder:" & vbCrlf & _
vbCrlf & _
"<Windows Folder>\Microsoft.Net\Framework\v2.0.50727" & vbCrLf & _
vbCrlf & _
"This can also be added via Add/Remove Windows Components. Once installed, " & vbCrLf & _
"please ensure this extension is enabled!", 48, "ASP.NET 2.0 Web Extension Needed..."
end if
If the ASP.NET 2.0 web extension is missing or disabled/prohibited, I would like to add this information to my needed Prerequisites page.
Any help is greatly appreciated!!
I would guess I could use File.Open or Shell.Execute actions, but I don't know if there is a way to actually have the script and my AutoPlay wrapper talk to each other - pass information back.
![]()

!
