Expert Software Company : News

miercuri, 19 mai 2010

Verifica daca SQL Server este instalat

objWMI = GetObject("winmgmts:\\")
cCadWMI = "Select * from Win32_Service Where Name = 'MSSQLServer'"
oBServ = objWMI.ExecQuery(cCadWMI)

If oBServ.Count > 0 Then
For Each objSer in oBServ
? "SQL Server is " + objSer.State + "."
Next
Else
? "SQL Server no este intalat pe acest calculator."
EndIf

Niciun comentariu:

Trimiteți un comentariu