Also add an ELSE section to the fllowing if..endif.
Code:

$objService = Getobject("WinNT://$Computer/$Service,Service")
if @error = 0
...
else
? $Computer
? "Error: " + @error
? " " + @serror
endif



This will let you know if the remote service could not be contacted.


Edited by Howard Bullock (2006-03-29 06:00 PM)
_________________________
Home page: http://www.kixhelp.com/hb/