China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-03 13:52
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] How to use a batch file to display a process list with file paths View 892 Replies 5
Original Poster Posted 2007-02-12 13:14 ·  中国 江苏 南京 电信
初级用户
Credits 63
Posts 24
Joined 2006-12-19 09:59
19-year member
UID 73949
Gender Male
From 南京
Status Offline
As the title says, I remember seeing before that calling a VBS could do it, but I forgot...
Floor 2 Posted 2007-02-12 13:17 ·  中国 江苏 南京 电信
初级用户
Credits 63
Posts 24
Joined 2006-12-19 09:59
19-year member
UID 73949
Gender Male
From 南京
Status Offline
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
Floor 3 Posted 2007-02-12 22:56 ·  中国 甘肃 兰州 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
wmic works too
Floor 4 Posted 2007-02-13 01:02 ·  中国 四川 绵阳 江油市 电信
高级用户
★★★
Credits 502
Posts 327
Joined 2006-12-30 06:01
19-year member
UID 74981
Gender Male
Status Offline
Floor 5 Posted 2007-02-13 06:10 ·  中国 江苏 连云港 电信
高级用户
★★★
前进者
Credits 641
Posts 303
Joined 2007-01-10 02:57
19-year member
UID 76009
Gender Male
Status Offline
wmic process get commandline,caption
works too
我相信总有一天,总会遇到一个人可以相濡以沫、相吻以湿!
Floor 6 Posted 2007-02-24 13:43 ·  中国 湖北 潜江 电信
高级用户
★★★
Credits 894
Posts 411
Joined 2007-02-17 12:15
19-year member
UID 79697
Gender Male
Status Offline
I learned something today. I had looked at wmic help before, and was completely confused.
Forum Jump: