| WMIC 全称 Windows Management Instrumentation Command-line 是一个类似CMD的命令行接口程序。 不过比CMD强大很多,下面是用法  
 在CMD,或者运行框中打入WMIC进入该环境。
 
 /? 帮助 → 这个是最重要的,其实只要记住这个就行了
  不过为了凑点字数不显坑爹之处还是说说其他的吧
  
 在使用/? 后会提示任意键下翻,如果不出意外后面应该是中文的解释应该都能看懂。
 
 譬如想用 Process 来控制进程,那么键入 Process /? 可以看到该命令的相关帮助,
 继续看不懂可以继续 /? 譬如 Process Call /?复制代码HINT: BNF for Alias usage.
(<alias> [WMIObject] | <alias> [<path where>] | [<alias>] <path where>) [<verb clause>].
USAGE:
PROCESS ASSOC [<format specifier>]
PROCESS CALL <method name> [<actual param list>]
PROCESS CREATE <assign list>
PROCESS DELETE
PROCESS GET [<property list>] [<get switches>]
PROCESS LIST [<list format>] [<list switches>]
上面是重点这些方法可以用 Process Call *** 来调用复制代码Call                    [ In/Out ]Params&type                   Status
====                    =====================                   ======
AttachDebugger                                                  (null)
Create                  [IN ]CommandLine(STRING)                (null)
                        [IN ]CurrentDirectory(STRING)
                        [IN ]ProcessStartupInformation(OBJECT)
                        [OUT]ProcessId(UINT32)
GetOwner                [OUT]Domain(STRING)                     (null)
                        [OUT]User(STRING)
GetOwnerSid             [OUT]Sid(STRING)                        (null)
SetPriority             [IN ]Priority(SINT32)                   (null)
Terminate               [IN ]Reason(UINT32)                     (null)
 譬如 Process Call Crate explorer.exe 结束后会返回PID和返回值
 
 当然还可以查看这个对象的属性及其成员 Process get /?
 Process  get handle 得到进程的PID列表
 process  get name 得到进程的文件名
 
 这样做比较麻烦简便的方法还有list同样  process list /? 来查看 list的使用方法
 
 process list full 可以得到详细的进程列表信息。
 
 不过功能不止这些你可以通过 process where 来更方便的得到进程信息
 
 同理 process where /? 查看 where 用法
 
 举两个例子
 process where "handle='4'" list full 这样就能查看PID为4进程的全部信息
 process where "name='QQ.exe'" list full (这里的list full 可以替换成 get name、get handle等等来获取不同的信息)
 |