On Error Resume Next set wmi = GetObject("WINMGMTS:\\.\root\Microsoft\SqlServer\ComputerManagement") If err.number <> 0 THEN MsgBox "WMI Klasse root\Microsoft\SqlServer\ComputerManagement nicht vorhanden - Es ist kein MS SQL Server 2005 installiert!" Else for each prop in wmi.ExecQuery("select * from SqlServiceAdvancedProperty where SQLServiceType = 1 AND PropertyName = 'VERSION'") MsgBox prop.ServiceName & " " & prop.PropertyName & ": " & prop.PropertyStrValue, vbOKOnly, "SQL Server" next End If