title: Using VBScript how can I check if the Spooler service is started and if not start it?
body: <p>I'd like to use VBScript to check if the Spooler service is started and if not start it, the code below checks the service status but I need some help modifying this so I can check if it is started.</p>
  
  <pre><code>strComputer = "."
  Set objWMIService = GetObject("winmgmts:" _
      &amp; "{impersonationLevel=impersonate}!\\" &amp; strComputer &amp; "\root\cimv2")
  Set colRunningServices = objWMIService.ExecQuery _
      ("Select * from Win32_Service")
  For Each objService in colRunningServices 
      Wscript.Echo objService.DisplayName  &amp; VbTab &amp; objService.State
  Next
  </code></pre>
  
  <p>Many thanks
  Steven</p>