windows下wmic命令学习笔记

参考原文:https://www.t00ls.net/articles-36133.html

wmic process where(description="mysqld.exe") >> mysql.log
#查询MySQL的路径输出到MySQL.log文件

wmic process where(description="cmd.exe")
#查询cmd的路径并立即输出

wmic service where caption="zhudongfangyu" call stopservice  
wmic service where name="zhudongfangyu" call stopservice
echo y|wmic process where processid=6428 call terminate  干掉pid
echo y|wmic process where name="SogouExplorer.exe" call terminate 干掉进程

wmic process get description,executablepath
#获取进程路径

wmic product get name,versionwmic product list brief
#查看安装的软件

你可能感兴趣的:(windows下wmic命令学习笔记)