SUPINFO International University

SUPINFO Institute of Information Technology
Laboratoire Microsoft




Vérifier si SQL Server est installé sur un ordinateur

Accueil > Script > windows_2003 > Vérifier si SQL Server est installé sur un ordinateur

Vérifier si SQL Server est installé sur un ordinateur

Par Joachim GOMARD, LABORATOIRE SUPINFO DES TECHNOLOGIES MICROSOFT
Publiée le 23/10/2004 vers 15h.

Description :
Ce script permet de vérifier si SQL Server est installé sur un ordinateur (par défaut ca sera le votre) :

Script :
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServices = objWMIService.ExecQuery("Select * from Win32_Service Where Name = 'MSSQLServer'")
If colServices.Count > 0 Then
For Each objService in colServices
Wscript.Echo "SQL Server is " & objService.State & "."
Next
Else
Wscript.Echo "SQL Server is not installed on this computer."
End If

Proposer un script

Notre avis :

Votre avis :

Réactions :
0

Votants :
22

Visites :
16447

1
2
3
4
5




Retrouvez ci-dessous les autres sections du Laboratoire Microsoft