============= CheckStatus.vbs ==================
Set SQLServer = CreateObject("SQLDMO.SQLServer")
SQLServer.Name="SomeServer"
st=SQLServer.Status
if st=1 then
MsgBox "Running"
elseif st=2 then
MsgBox "Paused"
elseif st=3 then
MsgBox "Stopped"
elseif st=4 then
MsgBox "From stopped to running"
elseif st=5 then
MsgBox "From running to stopped"
elseif st=6 then
MsgBox "From paused to running"
elseif st=7 then
MsgBox "From running to paused"
else
MsgBox "Unable to determine"
end if
==========================================