I'm new to WIMC
so probably there will be simple answer to my question.
If I will open CMD
and run this command:
wmic /OUTPUT:C:\LogServices.txt service where "not PathName like '%Windows%'" get DisplayName,Name,PathName,State,StartMode
this will generate file with all services not in windows folder.
If I will save above command in bat file and run this will generate list all services somehow ignoring WHERE
statement. Running this as Administrator not changing anything.
In a batch script you have to double pump the
%
signs so they'll be treated as literal percent signs. Change your command to this and it'll work:wmic /OUTPUT:C:\LogServices.txt service where "not PathName like '%%Windows%%'" get DisplayName,Name,PathName,State,StartMode