WMIC command not working in .bat file -
i'm new wimc
there simple reply question.
if open cmd
, run command:
wmic /output:c:\logservices.txt service "not pathname '%windows%'" displayname,name,pathname,state,startmode
this generate file services not in windows folder.
if save above command in bat file , run generate list services somehow ignoring where
statement. running administrator not changing anything.
in batch script have double pump %
signs they'll treated literal percent signs. alter command , it'll work:
wmic /output:c:\logservices.txt service "not pathname '%%windows%%'" displayname,name,pathname,state,startmode
wmic
No comments:
Post a Comment