set objcimv2 = getobject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") set svcset = objcimv2.execquery("select * from Win32_Service where name='iisadmin'") if svcset.count > 0 then msgbox("IIS ADMIN SERVICE FOUND") else msgbox("IIS ADMIN SERVICE NOT FOUND") end if