> Does anybody know how to obtain the PID of a process that
> is running without having to pull up the Task Manager?
- - - - - - - - - - begin screen capture - - - - - - - - - -
C:\cmd>pslist
PsList v1.12 - Process Information Lister
Copyright (C) 1999-2000 Mark Russinovich
Systems Internals - http://www.sysinternals.com
Process information for ((computername)):
Name Pid Pri Thd Hnd Mem User Time Kernel Time Elapsed Time
Idle 0 0 1 0 16 0:00:00.000 750:55:15.566 837:15:21.784
System 8 8 31 192 216 0:00:00.000 0:28:00.306 837:15:21.784
SMSS 140 11 6 33 360 0:00:00.010 0:00:01.712 837:15:21.784
CSRSS 164 13 11 436 3848 0:05:52.937 0:26:32.029 837:15:16.296
WINLOGON 160 13 18 396 1712 0:00:15.682 0:00:46.286 837:15:14.503
SERVICES 212 9 35 558 3108 0:00:30.443 0:01:22.398 837:15:13.051
LSASS 224 9 16 302 552 0:00:49.711 0:01:07.717 837:15:13.021
svchost 404 8 9 258 2776 0:00:01.392 0:00:10.705 837:15:08.054
spoolsv 436 8 10 163 2816 0:00:01.572 0:00:37.774 837:15:07.694
3CDMINIC 484 8 5 66 1960 0:00:00.030 0:00:14.651 837:15:07.243
defwatch 496 8 4 45 1724 0:00:00.020 0:00:06.379 837:15:07.093
DKService 508 8 4 81 2092 0:00:10.324 0:00:25.797 837:15:06.962
Dmisrv 536 8 3 36 772 0:00:00.030 0:00:02.824 837:15:06.622
svchost 552 8 14 230 2520 0:00:02.203 0:00:21.490 837:15:06.552
Delldmi 564 8 4 62 2184 0:00:00.160 0:00:13.529 837:15:06.532
inetd32 600 8 3 51 1832 0:00:00.210 0:00:19.818 837:15:03.397
rtvscan 624 8 34 301 3588 0:03:06.388 0:12:27.905 837:15:02.967
rxstack 696 8 2 40 1076 0:00:00.010 0:00:11.246 837:15:01.404
RKillSrv 708 13 3 30 900 0:00:00.010 0:00:06.379 837:15:01.064
regsvc 720 8 2 30 752 0:00:00.010 0:00:06.399 837:15:00.784
Win32sl 860 8 11 201 1244 0:00:00.110 0:00:21.330 837:14:55.556
MsPMSPSv 892 8 2 53 1332 0:00:00.010 0:00:12.077 837:14:55.276
svchost 904 8 6 222 4124 0:00:07.450 0:00:36.612 837:14:55.186
nic 884 8 3 39 1392 0:00:00.050 0:00:07.681 837:14:50.469
COO 968 8 3 42 1480 0:00:00.030 0:00:04.626 837:14:50.439
Dnar 976 8 3 79 2424 0:00:00.100 0:00:11.796 837:14:50.429
NodeMngr 984 8 4 90 2492 0:00:00.060 0:00:16.223 837:14:50.399
ftpdw 1112 8 3 75 2580 0:00:00.090 0:00:16.704 790:54:26.007
atsvc 1384 8 4 37 1092 0:00:13.719 0:00:34.980 598:36:13.800
ftpdw 1324 8 3 75 2568 0:00:00.020 0:00:02.914 209:33:32.792
explorer 1300 8 12 285 3692 0:00:01.622 0:00:06.479 0:47:59.941
point32 1932 8 2 31 1596 0:00:00.010 0:00:00.070 0:47:51.959
vptray 1124 8 3 110 3000 0:00:00.030 0:00:00.130 0:47:51.288
evntsvc 1452 8 2 25 108 0:00:00.010 0:00:00.110 0:47:50.527
mozilla 876 8 13 262 83044 0:02:13.271 0:01:22.007 0:47:48.214
ClipMt61 1272 8 6 226 4616 0:00:02.493 0:00:03.645 0:47:46.411
WZQKPICK 248 8 1 36 2000 0:00:00.030 0:00:00.010 0:47:42.215
wuauclt 1164 8 4 99 2608 0:00:00.040 0:00:00.080 0:47:39.221
CMD 1632 8 1 23 1180 0:00:00.991 0:00:04.696 0:46:42.800
NTVDM 1440 8 3 52 2988 0:00:15.171 0:00:03.575 0:35:14.049
pslist 1292 8 2 69 1108 0:00:00.020 0:00:00.040 0:00:00.650
C:\cmd>for /f "tokens=2" %a in ('pslist ^| findstr /i "SERVICES"') do set PID=%a
C:\cmd>set PID=212
- - - - - - - - - - end screen capture - - - - - - - - - -

Signature
Phil Robyn
Univ. of California, Berkeley
u n z i p m y a d d r e s s t o s e n d e - m a i l
Brendon Rogers - 29 Jul 2003 12:13 GMT
or TLIST.EXE from the Resource Kit
> > Does anybody know how to obtain the PID of a process that
> > is running without having to pull up the Task Manager?
[quoted text clipped - 55 lines]
> C:\cmd>set PID=212
> - - - - - - - - - - end screen capture - - - - - - - - - -