title: javascript to stop specific service
body: <p>I have the following code in a script.
  The problem is That I want to get information of scripts that starts in a specific name and are in a specific startmode. </p>
  
  <pre><code>var e = new Enumerator(GetObject("winmgmts:").InstancesOf("Win32_Service"))
  var WSHShell = new ActiveXObject ("WScript.Shell");
  
  var strPrefix = "TTTT";
  
  for(;!e.atEnd(); e.moveNext()){
   var Service = e.item();
   var strName = Service.Name;
  
   if (strName.substr (0, strPrefix.length) == strPrefix) { 
    if(Service.StartMode == 'mmManual') {
     WScript.Echo("Yes");
    }
    if(e.StartMode == 'Manual') {
     WScript.Echo("Yes");
    }
   } 
  }
  </code></pre>
  
  <p>In the above script I tried to know the start mode but it always return true.</p>