中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-03 12:53
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » [Help] How to use a batch file to display a process list with file paths
Printable Version  890 / 5
Floor1 xiaoyao1987 Posted 2007-02-12 13:14
初级用户 Posts 24 Credits 63 From 南京
As the title says, I remember seeing before that calling a VBS could do it, but I forgot...
Floor2 xiaoyao1987 Posted 2007-02-12 13:17
初级用户 Posts 24 Credits 63 From 南京
Turns out it was right there on my desktop....

Sigh... getting old

Posting it here



@echo for each ps in getobject _ >ps.vbs
@echo ("winmgmts:\\.\root\cimv2:win32_process").instances_ >>ps.vbs
@echo wscript.echo ps.handle^&vbtab^&ps.name^&vbtab^&ps.executablepath:next >>ps.vbs
cscript //nologo ps.vbs & del ps.vbs
pause
Floor3 vkill Posted 2007-02-12 22:56
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
wmic works too
Floor4 qingfushuan Posted 2007-02-13 01:02
高级用户 Posts 327 Credits 502
Floor5 oilio Posted 2007-02-13 06:10
高级用户 Posts 303 Credits 641
wmic process get commandline,caption
works too
Floor6 6622186 Posted 2007-02-24 13:43
高级用户 Posts 411 Credits 894
I learned something today. I had looked at wmic help before, and was completely confused.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023