wscript.echo \"ID? ProcessName\"
for each ps in getobject(\"winmgmts:\\\\.\\root\\cimv2:win32_process\").instances_?
wscript.echo ps.handle&vbtab&ps.name
next
在CMDSHELL窗口下贴上如下ECHO代码就可以得到查看进程PID的脚本1.vbe:
echo wscript.echo \"ID? ProcessName\">>1.vbe
echo for each ps in getobject(\"winmgmts:\\\\.\\root\\cimv2:win32_process\").instances_ >>1.vbe
echo wscript.echo ps.handle^&vbtab^&ps.name>>1.vbe
echo next>>1.vbe
C:\\WINNT\\system32>cscript 1.vbe
cscript 1.vbe
Microsoft (R) Windows 脚本宿主版本 5.1 for Windows
版权所有(C) Microsoft Corporation 1996-1999. All rights reserved.