Check sql server installed in our system or not...
< script type="text/vbscript" >
function greeting()
Dim intCounter, strSubkey
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
intCounter=0
For Each subkey In arrSubKeys
If subkey="Microsoft SQL Server" Then
intCounter=1
strSubkey=subkey
End If
Next
alert(intCounter)
if intCounter=0 then
alert("No IIS installed")
exit function
Elseif intCounter=1 then
alert(strSubkey & " -is installed " )
End If
alert("end")
end function
< /script >
No comments: