title: WMIC command not working in .bat file
body: <p>I'm new to <code>WIMC</code> so probably there will be simple answer to my question.</p>
  
  <p>If I will open <code>CMD</code> and run this command:</p>
  
  <p><code>wmic /OUTPUT:C:\LogServices.txt service where "not PathName like '%Windows%'" get DisplayName,Name,PathName,State,StartMode</code></p>
  
  <p>this will generate file with all services not in windows folder.</p>
  
  <p>If I will save above command in bat file and run this will generate list all services somehow ignoring <code>WHERE</code> statement. Running this as Administrator not changing anything.</p>