Check out fADSIServiceRun(). This code uses ADSI via COM to work with services. In it is simple code that will show how to get the status of a service.
code:
$objService = Getobject("WinNT://$Computer/$Service,Service")
if @error = 0
$status = $objService.status
;$status = 4 ;Running
;$status = 1 ;Stopped
;$status = 7 ;Paused
endif



[ 28. May 2003, 00:16: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/