title: Stopping a service and waiting in VBScript
body: <p>How can I stop a service and wait for it to finish stopping in vbscript?</p>
  
  <p>I've got this so far:</p>
  
  <pre><code>For Each objService in colServiceList
      If objService.DisplayName = "&lt;my display name&gt;" Then
          objService.StopService()
      End If
  Next
  </code></pre>
  
  <p>Googling turned up a suggestion of using <code>objService.WaitForStatus( ServiceControllerStatus.Stopped )</code>, but running that gives me an error of "Object required: 'ServiceControllerStatus'".</p>