Re: Service failure



but he just said its not a service(?)



"Adam Sandler" <corn29@xxxxxxxxxx> wrote in message news:1181581089.055455.54020@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jun 8, 9:56 pm, Rob <R...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
The service is not a "typical service" in services.msc
It is a process named requestq - that you can see running in task manager.
This process sometimes dies.

As I mentioned earlier, there are a few ways to make this happen...
the really smelly but simple solution goes something like this:

Dim objNet : Set objNet = CreateObject("WScript.Network")
Dim sName : sName = objNet.ComputerName
Dim objWMI : Set objWMI = GetObject("winmgmts:\\" & sName &
"\root\CIMV2")
Dim objService : Set objService =
objWMI.Get("Win32_Service.Name='servicename'")

Do Until hellFreezesOver

If objService.State = "Stopped" Then
start = objService.StartService()
End If

WScript.Sleep 2000

Loop

Something a bit more elegant is monitoring your process
asynchronously. This link will get your started:

http://www.microsoft.com/technet/scriptcenter/resources/scriptshop/shop0805.mspx



.