[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[原创] 【续】[一日一教学](34)显示进程清单:tasklist

本帖最后由 Hello123World 于 2011-10-17 14:35 编辑

【原】[一日一教学]批处理系列帖子索引 http://bbs.bathome.net/thread-2576-1-1.html
【续】[一日一教学]批处理系列帖子索引 http://bbs.bathome.net/thread-13798-1-1.html


帮助信息:
  1. TASKLIST [/S system [/U username [/P [password]]]]
  2.          [/M [module] | /SVC | /V] [/FI filter] [/FO format] [/NH]
  3. 描述:
  4.     该工具显示在本地或远程机器上当前运行的进程列表。
  5. 参数列表:
  6.    /S     system           指定连接到的远程系统。
  7.    /U     [domain\]user    指定应该在哪个用户上下文执行这个命令。
  8.    /P     [password]       为提供的用户上下文指定密码。如果省略,则
  9.                            提示输入。
  10.    /M     [module]         列出当前使用所给 exe/dll 名称的所有任务。
  11.                            如果没有指定模块名称,显示所有加载的模块。
  12.    /SVC                    显示每个进程中主持的服务。
  13.    /V                      显示详述任务信息。
  14.    /FI    filter           显示一系列符合筛选器指定的标准的任务。
  15.    /FO    format           指定输出格式。
  16.                            有效值: "TABLE"、"LIST"、"CSV"。
  17.    /NH                     指定列标题不应该在输出中显示。
  18.                            只对 "TABLE" 和 "CSV" 格式有效。
  19.    /?                      显示帮助消息。
  20. 筛选器:
  21.     筛选器名        有效操作符                有效值
  22.     -----------     ---------------           --------------------------
  23.     STATUS          eq, ne                    RUNNING |
  24.                                               NOT RESPONDING | UNKNOWN
  25.     IMAGENAME       eq, ne                    映像名称
  26.     PID             eq, ne, gt, lt, ge, le    PID 值
  27.     SESSION         eq, ne, gt, lt, ge, le    会话编号
  28.     SESSIONNAME     eq, ne                    会话名
  29.     CPUTIME         eq, ne, gt, lt, ge, le    CPU 时间,格式为
  30.                                               hh:mm:ss。
  31.                                               hh - 时,
  32.                                               mm - 分,ss - 秒
  33.     MEMUSAGE        eq, ne, gt, lt, ge, le    内存使用量,单位为 KB
  34.     USERNAME        eq, ne                    用户名,格式为 [domain\]user
  35.     SERVICES        eq, ne                    服务名称
  36.     WINDOWTITLE     eq, ne                    窗口标题
  37.     MODULES         eq, ne                    DLL 名称
  38. 说明: 当查询远程机器时,不支持 "WINDOWTITLE" 和 "STATUS"
  39.       筛选器。
  40. 示例:
  41.     TASKLIST
  42.     TASKLIST /M
  43.     TASKLIST /V /FO CSV
  44.     TASKLIST /SVC /FO LIST
  45.     TASKLIST /M wbem*
  46.     TASKLIST /S system /FO LIST
  47.     TASKLIST /S system /U domain\username /FO CSV /NH
  48.     TASKLIST /S system /U username /P password /FO TABLE /NH
  49.     TASKLIST /FI "USERNAME ne NT AUTHORITY\SYSTEM" /FI "STATUS eq running"
复制代码
命令概括:

tasklist,意为“任务列表”;
/s,全英文system,意为“系统”;
/u,全英文user,意为“用户”;
/p,全英文password,意为“密码”;
/m,全英文module,意为“模块”;
/svc,全英文service,意为“服务”;(题外话,s、v、c都是service发音中的辅音,由此可见英文简写的一般规律)
/v,未知;
/fi,全英文filter,意为“过滤器”;
/fo,全英文format,意为“格式”;
/nh,全英文no heading,意为“无列标题”;“列标题”在这里是个名词。

参数详解:

/fi参数会在后续的taskkill中讲到,这里暂时不讲。

/s,/u,/p,由于不在局域网,这里就跳过不讲了(没办法弄)。

1.显示当前的进程
  1. tasklist
复制代码
光杆的tasklist会列出关于进程的5项数据,分别是,映像名称 ,PID, 会话名  ,会话# , 内存使用。



效果:
  1. 映像名称                       PID 会话名              会话#       内存使用
  2. ========================= ======== ================ =========== ============
  3. System Idle Process              0 Services                   0         24 K
  4. System                           4 Services                   0        252 K
  5. smss.exe                       276 Services                   0        536 K
  6. csrss.exe                      376 Services                   0      3,432 K
  7. wininit.exe                    416 Services                   0      2,720 K
  8. csrss.exe                      424 Console                    1     19,884 K
  9. winlogon.exe                   480 Console                    1      3,196 K
  10. services.exe                   500 Services                   0      6,224 K
  11. lsass.exe                      540 Services                   0      6,492 K
  12. lsm.exe                        548 Services                   0      2,092 K
  13. svchost.exe                    656 Services                   0      5,020 K
  14. svchost.exe                    752 Services                   0      5,372 K
  15. svchost.exe                    816 Services                   0     11,516 K
  16. svchost.exe                    892 Services                   0     23,436 K
  17. svchost.exe                    920 Services                   0     22,960 K
  18. svchost.exe                   1096 Services                   0      8,044 K
  19. ZhuDongFangYu.exe             1224 Services                   0      7,708 K
  20. svchost.exe                   1264 Services                   0     11,384 K
  21. dwm.exe                       1476 Console                    1     21,792 K
  22. explorer.exe                  1488 Console                    1     29,516 K
  23. spoolsv.exe                   1604 Services                   0      6,012 K
  24. sched.exe                     1660 Services                   0      1,600 K
  25. svchost.exe                   1696 Services                   0      8,476 K
  26. taskhost.exe                  1768 Console                    1      6,908 K
  27. avguard.exe                   1908 Services                   0     12,092 K
  28. avgnt.exe                     1960 Console                    1      2,244 K
  29. svchost.exe                   1968 Services                   0      3,964 K
  30. 360tray.exe                   1976 Console                    1     12,528 K
  31. c20ukdrwsvr.exe                292 Services                   0      2,296 K
  32. svchost.exe                   1888 Services                   0      8,456 K
  33. svchost.exe                    544 Services                   0      5,024 K
  34. inetinfo.exe                  1064 Services                   0      6,184 K
  35. svchost.exe                    112 Services                   0      2,648 K
  36. vmount2.exe                   2112 Services                   0      3,564 K
  37. vmnat.exe                     2340 Services                   0      3,024 K
  38. svchost.exe                   2436 Services                   0      4,696 K
  39. WDelMgr20.exe                 2556 Services                   0      1,192 K
  40. WLIDSVC.EXE                   2676 Services                   0      4,996 K
  41. svchost.exe                   2704 Services                   0      4,080 K
  42. vmware-authd.exe              2772 Services                   0      5,372 K
  43. WLIDSVCM.EXE                  2892 Services                   0      1,580 K
  44. vmnetdhcp.exe                 2908 Services                   0      1,796 K
  45. SearchIndexer.exe             3200 Services                   0     15,312 K
  46. svchost.exe                   3372 Services                   0      3,304 K
  47. chrome.exe                    3980 Console                    1    159,416 K
  48. chrome.exe                    1468 Console                    1     66,152 K
  49. chrome.exe                    2496 Console                    1     15,300 K
  50. chrome.exe                    1212 Console                    1     12,704 K
  51. chrome.exe                    2976 Console                    1     12,968 K
  52. chrome.exe                    2880 Console                    1     13,360 K
  53. chrome.exe                     148 Console                    1      6,880 K
  54. svchost.exe                   2684 Services                   0     15,972 K
  55. wmpnetwk.exe                  3296 Services                   0      6,392 K
  56. notepad++.exe                 1028 Console                    1     26,076 K
  57. chrome.exe                     340 Console                    1     58,284 K
  58. cmd.exe                       2000 Console                    1      2,520 K
  59. conhost.exe                   1036 Console                    1      6,012 K
  60. notepad.exe                    440 Console                    1      7,024 K
  61. YodaoDict.exe                 3448 Console                    1     27,484 K
  62. WmiPrvSE.exe                  3396 Services                   0     31,516 K
  63. WmiApSrv.exe                  2524 Services                   0      4,820 K
  64. tasklist.exe                  2964 Console                    1      4,628 K
  65. WmiPrvSE.exe                  3540 Services                   0      5,140 K
复制代码
2.显示运行了指定dll的进程
  1. tasklist /m ws2_32.dll
复制代码
效果:
  1. 映像名称                       PID 模块                                       
  2. ========================= ======== ============================================
  3. wininit.exe                    416 WS2_32.dll                                 
  4. services.exe                   500 WS2_32.dll                                 
  5. lsass.exe                      540 WS2_32.dll                                 
  6. svchost.exe                    656 WS2_32.dll                                 
  7. svchost.exe                    752 WS2_32.dll                                 
  8. svchost.exe                    816 WS2_32.dll                                 
  9. svchost.exe                    892 WS2_32.dll                                 
  10. svchost.exe                    920 WS2_32.dll                                 
  11. svchost.exe                   1096 WS2_32.dll                                 
  12. ZhuDongFangYu.exe             1224 WS2_32.dll                                 
  13. svchost.exe                   1264 WS2_32.dll                                 
  14. dwm.exe                       1476 WS2_32.dll                                 
  15. explorer.exe                  1488 WS2_32.dll                                 
  16. spoolsv.exe                   1604 WS2_32.dll                                 
  17. sched.exe                     1660 WS2_32.dll                                 
  18. svchost.exe                   1696 WS2_32.dll                                 
  19. taskhost.exe                  1768 WS2_32.dll                                 
  20. avguard.exe                   1908 WS2_32.dll                                 
  21. 360tray.exe                   1976 WS2_32.dll                                 
  22. svchost.exe                   1888 WS2_32.dll                                 
  23. svchost.exe                    544 WS2_32.dll                                 
  24. inetinfo.exe                  1064 WS2_32.dll                                 
  25. vmount2.exe                   2112 WS2_32.dll                                 
  26. vmnat.exe                     2340 WS2_32.dll                                 
  27. WLIDSVC.EXE                   2676 WS2_32.dll                                 
  28. svchost.exe                   2704 WS2_32.dll                                 
  29. vmware-authd.exe              2772 WS2_32.dll                                 
  30. vmnetdhcp.exe                 2908 WS2_32.dll                                 
  31. svchost.exe                   3372 WS2_32.dll                                 
  32. chrome.exe                    3980 WS2_32.dll                                 
  33. chrome.exe                    1468 WS2_32.dll                                 
  34. chrome.exe                    2496 WS2_32.dll                                 
  35. chrome.exe                    1212 WS2_32.dll                                 
  36. chrome.exe                    2976 WS2_32.dll                                 
  37. chrome.exe                    2880 WS2_32.dll                                 
  38. chrome.exe                     148 WS2_32.dll                                 
  39. svchost.exe                   2684 WS2_32.dll                                 
  40. wmpnetwk.exe                  3296 WS2_32.dll                                 
  41. notepad++.exe                 1028 WS2_32.dll                                 
  42. chrome.exe                     340 WS2_32.dll                                 
  43. cmd.exe                       2000 WS2_32.dll                                 
  44. conhost.exe                   1036 WS2_32.dll                                 
  45. notepad.exe                    440 WS2_32.dll                                 
  46. YodaoDict.exe                 3448 WS2_32.dll                                 
  47. WmiPrvSE.exe                  3396 WS2_32.dll                                 
  48. taskmgr.exe                   3344 WS2_32.dll                                 
  49. notepad.exe                   2516 WS2_32.dll                                 
  50. WmiPrvSE.exe                  3864 WS2_32.dll                                 
  51. tasklist.exe                  4052 WS2_32.dll                                 
复制代码
3.显示进程需要哪些服务的支持
  1. tasklist /svc
复制代码
这条命令在应对一些有服务支持的流氓软件时颇为有用——找出对应流氓软件相关进程的服务,关闭服务。



效果:
  1. 映像名称                       PID 服务                                       
  2. ========================= ======== ============================================
  3. System Idle Process              0 暂缺                                       
  4. System                           4 暂缺                                       
  5. smss.exe                       276 暂缺                                       
  6. csrss.exe                      376 暂缺                                       
  7. wininit.exe                    416 暂缺                                       
  8. csrss.exe                      424 暂缺                                       
  9. winlogon.exe                   480 暂缺                                       
  10. services.exe                   500 暂缺                                       
  11. lsass.exe                      540 EFS, KeyIso, SamSs                          
  12. lsm.exe                        548 暂缺                                       
  13. svchost.exe                    656 DcomLaunch, PlugPlay, Power                 
  14. svchost.exe                    752 RpcEptMapper, RpcSs                        
  15. svchost.exe                    816 Audiosrv, Dhcp, eventlog, lmhosts, wscsvc   
  16. svchost.exe                    892 AudioEndpointBuilder, CscService, hidserv,  
  17.                                    Netman, PcaSvc, SysMain, TrkWks, UxSms,     
  18.                                    Wlansvc, wudfsvc                           
  19. svchost.exe                    920 BITS, Browser, EapHost, gpsvc, IKEEXT,      
  20.                                    iphlpsvc, LanmanServer, MMCSS, ProfSvc,     
  21.                                    RasMan, Schedule, SENS, ShellHWDetection,   
  22.                                    Themes, Winmgmt, wuauserv                  
  23. svchost.exe                   1096 EventSystem, netprofm, nsi, SstpSvc,        
  24.                                    W32Time, WdiServiceHost                     
  25. ZhuDongFangYu.exe             1224 ZhuDongFangYu                              
  26. svchost.exe                   1264 CryptSvc, Dnscache, LanmanWorkstation,      
  27.                                    NlaSvc, TapiSrv                             
  28. dwm.exe                       1476 暂缺                                       
  29. explorer.exe                  1488 暂缺                                       
  30. spoolsv.exe                   1604 Spooler                                    
  31. sched.exe                     1660 AntiVirSchedulerService                     
  32. svchost.exe                   1696 BFE, DPS, MpsSvc                           
  33. taskhost.exe                  1768 暂缺                                       
  34. avguard.exe                   1908 AntiVirService                              
  35. avgnt.exe                     1960 暂缺                                       
  36. svchost.exe                   1968 AppHostSvc                                 
  37. 360tray.exe                   1976 暂缺                                       
  38. c20ukdrwsvr.exe                292 c20ukdrwsvc                                 
  39. svchost.exe                   1888 FDResPub, FontCache, SSDPSRV, upnphost      
  40. svchost.exe                    544 ftpsvc                                      
  41. inetinfo.exe                  1064 IISADMIN                                    
  42. svchost.exe                    112 StiSvc                                      
  43. vmount2.exe                   2112 vmount2                                    
  44. vmnat.exe                     2340 VMware NAT Service                          
  45. svchost.exe                   2436 W3SVC, WAS                                 
  46. WDelMgr20.exe                 2556 WDelMgr20                                   
  47. WLIDSVC.EXE                   2676 wlidsvc                                    
  48. svchost.exe                   2704 XLDoctor Service                           
  49. vmware-authd.exe              2772 VMAuthdService                              
  50. WLIDSVCM.EXE                  2892 暂缺                                       
  51. vmnetdhcp.exe                 2908 VMnetDHCP                                   
  52. SearchIndexer.exe             3200 WSearch                                    
  53. svchost.exe                   3372 PolicyAgent                                 
  54. chrome.exe                    3980 暂缺                                       
  55. chrome.exe                    1468 暂缺                                       
  56. chrome.exe                    2496 暂缺                                       
  57. chrome.exe                    1212 暂缺                                       
  58. chrome.exe                    2976 暂缺                                       
  59. chrome.exe                    2880 暂缺                                       
  60. chrome.exe                     148 暂缺                                       
  61. svchost.exe                   2684 WinDefend                                   
  62. wmpnetwk.exe                  3296 WMPNetworkSvc                              
  63. notepad++.exe                 1028 暂缺                                       
  64. chrome.exe                     340 暂缺                                       
  65. cmd.exe                       2000 暂缺                                       
  66. conhost.exe                   1036 暂缺                                       
  67. notepad.exe                    440 暂缺                                       
  68. YodaoDict.exe                 3448 暂缺                                       
  69. taskmgr.exe                   3344 暂缺                                       
  70. notepad.exe                   1396 暂缺                                       
  71. audiodg.exe                    320 暂缺                                       
  72. tasklist.exe                  2364 暂缺                                       
  73. WmiPrvSE.exe                  2488 暂缺                                       
复制代码
4.显示更详细的进程信息
  1. tasklist /v
复制代码
比光杆的tasklist,多了4个进程相关信息,分别是状态,用户名 ,CPU 时间 ,窗口标题 。


效果:
  1. 映像名称                       PID 会话名              会话#       内存使用  状态            用户名                                                 CPU 时间 窗口标题                                                               
  2. ========================= ======== ================ =========== ============ =============== ================================================== ============ ========================================================================
  3. System Idle Process              0 Services                   0         24 K Unknown         NT AUTHORITY\SYSTEM                                     2:58:32 暂缺                                                                    
  4. System                           4 Services                   0        252 K Unknown         暂缺                                                    0:01:01 暂缺                                                                    
  5. smss.exe                       276 Services                   0        536 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  6. csrss.exe                      376 Services                   0      3,428 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:01 暂缺                                                                    
  7. wininit.exe                    416 Services                   0      2,720 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  8. csrss.exe                      424 Console                    1     20,672 K Running         NT AUTHORITY\SYSTEM                                     0:00:17 暂缺                                                                    
  9. winlogon.exe                   480 Console                    1      3,640 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  10. services.exe                   500 Services                   0      6,236 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:07 暂缺                                                                    
  11. lsass.exe                      540 Services                   0      6,536 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:28 暂缺                                                                    
  12. lsm.exe                        548 Services                   0      2,108 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:01 暂缺                                                                    
  13. svchost.exe                    656 Services                   0      5,020 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:09 暂缺                                                                    
  14. svchost.exe                    752 Services                   0      5,376 K Unknown         NT AUTHORITY\NETWORK SERVICE                            0:00:02 暂缺                                                                    
  15. svchost.exe                    816 Services                   0     11,132 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:09 暂缺                                                                    
  16. svchost.exe                    892 Services                   0     24,400 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:17 暂缺                                                                    
  17. svchost.exe                    920 Services                   0     23,116 K Unknown         NT AUTHORITY\SYSTEM                                     0:03:54 暂缺                                                                    
  18. svchost.exe                   1096 Services                   0      8,056 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:07 暂缺                                                                    
  19. ZhuDongFangYu.exe             1224 Services                   0      7,808 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:01 暂缺                                                                    
  20. svchost.exe                   1264 Services                   0     11,424 K Unknown         NT AUTHORITY\NETWORK SERVICE                            0:03:56 暂缺                                                                    
  21. dwm.exe                       1476 Console                    1     22,224 K Running         helloworld-PC\helloworld                                0:01:20 DWM Notification Window                                                
  22. explorer.exe                  1488 Console                    1     31,632 K Running         helloworld-PC\helloworld                                0:00:29 暂缺                                                                    
  23. spoolsv.exe                   1604 Services                   0      6,012 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  24. sched.exe                     1660 Services                   0      1,600 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  25. svchost.exe                   1696 Services                   0      8,512 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:10 暂缺                                                                    
  26. taskhost.exe                  1768 Console                    1      6,996 K Running         helloworld-PC\helloworld                                0:00:00 MCI command handling window                                             
  27. avguard.exe                   1908 Services                   0      6,612 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:46 暂缺                                                                    
  28. avgnt.exe                     1960 Console                    1      2,184 K Running         helloworld-PC\helloworld                                0:00:11 暂缺                                                                    
  29. svchost.exe                   1968 Services                   0      3,968 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  30. 360tray.exe                   1976 Console                    1     10,556 K Running         helloworld-PC\helloworld                                0:00:55 360AsyncHelper                                                         
  31. c20ukdrwsvr.exe                292 Services                   0      2,296 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  32. svchost.exe                   1888 Services                   0      8,460 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:09 暂缺                                                                    
  33. svchost.exe                    544 Services                   0      5,028 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  34. inetinfo.exe                  1064 Services                   0      6,184 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  35. svchost.exe                    112 Services                   0      2,648 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:00 暂缺                                                                    
  36. vmount2.exe                   2112 Services                   0      3,564 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  37. vmnat.exe                     2340 Services                   0      3,024 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  38. svchost.exe                   2436 Services                   0      4,700 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  39. WDelMgr20.exe                 2556 Services                   0      1,192 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  40. WLIDSVC.EXE                   2676 Services                   0      4,996 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  41. svchost.exe                   2704 Services                   0      4,084 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:06 暂缺                                                                    
  42. vmware-authd.exe              2772 Services                   0      5,372 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:47 暂缺                                                                    
  43. WLIDSVCM.EXE                  2892 Services                   0      1,580 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  44. vmnetdhcp.exe                 2908 Services                   0      1,796 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暂缺                                                                    
  45. SearchIndexer.exe             3200 Services                   0     20,768 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:05 暂缺                                                                    
  46. svchost.exe                   3372 Services                   0      3,304 K Unknown         NT AUTHORITY\NETWORK SERVICE                            0:00:02 暂缺                                                                    
  47. chrome.exe                    3980 Console                    1    163,000 K Running         helloworld-PC\helloworld                                0:04:43 批处理教学&资料 - 批处理之家 ─ 做最实用的批处理论坛 - Powered by Discuz
  48. chrome.exe                    1468 Console                    1     66,328 K Unknown         helloworld-PC\helloworld                                0:01:34 暂缺                                                                    
  49. chrome.exe                    2496 Console                    1     14,980 K Unknown         helloworld-PC\helloworld                                0:00:17 暂缺                                                                    
  50. chrome.exe                    1212 Console                    1     12,704 K Unknown         helloworld-PC\helloworld                                0:00:01 暂缺                                                                    
  51. chrome.exe                    2976 Console                    1     12,968 K Unknown         helloworld-PC\helloworld                                0:00:01 暂缺                                                                    
  52. chrome.exe                    2880 Console                    1     13,364 K Unknown         helloworld-PC\helloworld                                0:00:01 暂缺                                                                    
  53. chrome.exe                     148 Console                    1      6,880 K Running         helloworld-PC\helloworld                                0:00:00 暂缺                                                                    
  54. svchost.exe                   2684 Services                   0     17,880 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:28 暂缺                                                                    
  55. wmpnetwk.exe                  3296 Services                   0      6,428 K Unknown         NT AUTHORITY\NETWORK SERVICE                            0:01:25 暂缺                                                                    
  56. notepad++.exe                 1028 Console                    1     26,076 K Running         helloworld-PC\helloworld                                0:00:04 C:\Users\helloworld\Desktop\1.txt - Notepad++                           
  57. chrome.exe                     340 Console                    1     61,976 K Unknown         helloworld-PC\helloworld                                0:01:43 暂缺                                                                    
  58. cmd.exe                       2000 Console                    1      7,112 K Running         helloworld-PC\helloworld                                0:00:00 暂缺                                                                    
  59. conhost.exe                   1036 Console                    1      6,716 K Running         helloworld-PC\helloworld                                0:00:04 CicMarshalWnd                                                           
  60. notepad.exe                    440 Console                    1      7,032 K Running         helloworld-PC\helloworld                                0:00:03 1.txt - 记事本                                                         
  61. YodaoDict.exe                 3448 Console                    1     27,768 K Running         helloworld-PC\helloworld                                0:00:35 有道词典                                                               
  62. taskmgr.exe                   3344 Console                    1      9,852 K Running         helloworld-PC\helloworld                                0:00:01 Windows 任务管理器                                                      
  63. audiodg.exe                    320 Services                   0     14,080 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:00 暂缺                                                                    
  64. notepad.exe                   1240 Console                    1      7,056 K Running         helloworld-PC\helloworld                                0:00:00 2.txt - 记事本                                                         
  65. taskeng.exe                   3304 Console                    1      5,784 K Running         helloworld-PC\helloworld                                0:00:00 TaskEng - 任务计划程序引擎进程                                          
  66. tasklist.exe                  2284 Console                    1      5,092 K Unknown         helloworld-PC\helloworld                                0:00:00 暂缺                                                                    
  67. WmiPrvSE.exe                   768 Services                   0      5,152 K Unknown         NT AUTHORITY\NETWORK SERVICE                            0:00:00 暂缺                                                                    
复制代码
5.进程信息的显示格式
  1. tasklist /fo [table|list|svc]
复制代码
用/fo参数控制,一共3种显示格式,默认是table方式显示;


6.取消掉列表题得显示
  1. tasklist /nh
复制代码
对比光杆tasklist的显示效果,你就明白了。

效果:
  1. System Idle Process              0 Services                   0         24 K
  2. System                           4 Services                   0        252 K
  3. smss.exe                       276 Services                   0        536 K
  4. csrss.exe                      376 Services                   0      3,424 K
  5. wininit.exe                    416 Services                   0      2,720 K
  6. csrss.exe                      424 Console                    1     20,668 K
  7. winlogon.exe                   480 Console                    1      3,640 K
  8. services.exe                   500 Services                   0      6,204 K
  9. lsass.exe                      540 Services                   0      6,536 K
  10. lsm.exe                        548 Services                   0      2,068 K
  11. svchost.exe                    656 Services                   0      5,020 K
  12. svchost.exe                    752 Services                   0      5,384 K
  13. svchost.exe                    816 Services                   0     11,104 K
  14. svchost.exe                    892 Services                   0     24,400 K
  15. svchost.exe                    920 Services                   0     23,036 K
  16. svchost.exe                   1096 Services                   0      8,052 K
  17. ZhuDongFangYu.exe             1224 Services                   0      7,808 K
  18. svchost.exe                   1264 Services                   0     11,528 K
  19. dwm.exe                       1476 Console                    1     22,236 K
  20. explorer.exe                  1488 Console                    1     31,508 K
  21. spoolsv.exe                   1604 Services                   0      6,012 K
  22. sched.exe                     1660 Services                   0      1,600 K
  23. svchost.exe                   1696 Services                   0      8,524 K
  24. taskhost.exe                  1768 Console                    1      6,992 K
  25. avguard.exe                   1908 Services                   0      6,824 K
  26. avgnt.exe                     1960 Console                    1      2,188 K
  27. svchost.exe                   1968 Services                   0      3,968 K
  28. 360tray.exe                   1976 Console                    1     11,188 K
  29. c20ukdrwsvr.exe                292 Services                   0      2,296 K
  30. svchost.exe                   1888 Services                   0      8,460 K
  31. svchost.exe                    544 Services                   0      5,020 K
  32. inetinfo.exe                  1064 Services                   0      6,188 K
  33. svchost.exe                    112 Services                   0      2,648 K
  34. vmount2.exe                   2112 Services                   0      3,564 K
  35. vmnat.exe                     2340 Services                   0      3,024 K
  36. svchost.exe                   2436 Services                   0      4,712 K
  37. WDelMgr20.exe                 2556 Services                   0      1,192 K
  38. WLIDSVC.EXE                   2676 Services                   0      4,996 K
  39. svchost.exe                   2704 Services                   0      4,084 K
  40. vmware-authd.exe              2772 Services                   0      5,372 K
  41. WLIDSVCM.EXE                  2892 Services                   0      1,580 K
  42. vmnetdhcp.exe                 2908 Services                   0      1,796 K
  43. SearchIndexer.exe             3200 Services                   0     21,444 K
  44. svchost.exe                   3372 Services                   0      3,304 K
  45. chrome.exe                    3980 Console                    1    163,308 K
  46. chrome.exe                    1468 Console                    1     66,396 K
  47. chrome.exe                    2496 Console                    1     15,488 K
  48. chrome.exe                    1212 Console                    1     12,696 K
  49. chrome.exe                    2976 Console                    1     12,968 K
  50. chrome.exe                    2880 Console                    1     13,364 K
  51. chrome.exe                     148 Console                    1      6,880 K
  52. svchost.exe                   2684 Services                   0     16,288 K
  53. wmpnetwk.exe                  3296 Services                   0      6,428 K
  54. notepad++.exe                 1028 Console                    1     26,076 K
  55. chrome.exe                     340 Console                    1     63,056 K
  56. cmd.exe                       2000 Console                    1      7,172 K
  57. conhost.exe                   1036 Console                    1      6,716 K
  58. notepad.exe                    440 Console                    1      7,032 K
  59. YodaoDict.exe                 3448 Console                    1     27,904 K
  60. taskmgr.exe                   3344 Console                    1      9,860 K
  61. tasklist.exe                  1524 Console                    1      4,604 K
  62. WmiPrvSE.exe                  2032 Services                   0      5,164 K
复制代码
扩展阅读:

1.神马是进程?

进程是动态的程序代码;——写好了程序代码,但你不运行程序,代码永远都只是一些怪异的符号,只有当程序运行时代码才产生了意义,这时候的程序代码被称为进程。

进程百科:http://baike.baidu.com/view/19746.htm

windows入门,开机11个进程作用讲解:http://www.qqread.com/meetwindows/p495414.html

更多进程知识:http://www.qqread.com/z/windows/process/

好 顶

TOP

呵呵,又提意见了,别拍砖啊!建议将那些多余的进程删掉除非直接用来讲解的,放那么多进程进来不好看,不好找东西看。
寂寞是黑白的,但黑白不是寂寞,是永恒。BAT 需要的不是可能,而是智慧。

TOP

这个没办法,本来想传图的,但为了节省bathome的磁盘空间。

这样虽然不美观,但勉强还是能看的

TOP

怎么Hello123World 系统里还会有ZhuDongFangYu.exe  卸了吧 IT时代 倡导裸奔。

TOP

回复 4# Hello123World


    没明白我的意思,我的意思是把那些不是系统进程删掉。
  1. wininit.exe                    416 Services                   0      2,720 K
  2. lsm.exe                        548 Services                   0      2,068 K
  3. ZhuDongFangYu.exe             1224 Services                   0      7,808 K
  4. dwm.exe                       1476 Console                    1     22,236 K
  5. sched.exe                     1660 Services                   0      1,600 K
  6. taskhost.exe                  1768 Console                    1      6,992 K
  7. avguard.exe                   1908 Services                   0      6,824 K
  8. avgnt.exe                     1960 Console                    1      2,188 K
  9. 360tray.exe                   1976 Console                    1     11,188 K
  10. c20ukdrwsvr.exe                292 Services                   0      2,296 K
  11. inetinfo.exe                  1064 Services                   0      6,188 K
  12. svchost.exe                    112 Services                   0      2,648 K
  13. vmount2.exe                   2112 Services                   0      3,564 K
  14. vmnat.exe                     2340 Services                   0      3,024 K
  15. WDelMgr20.exe                 2556 Services                   0      1,192 K
  16. WLIDSVC.EXE                   2676 Services                   0      4,996 K
  17. vmware-authd.exe              2772 Services                   0      5,372 K
  18. WLIDSVCM.EXE                  2892 Services                   0      1,580 K
  19. vmnetdhcp.exe                 2908 Services                   0      1,796 K
  20. SearchIndexer.exe             3200 Services                   0     21,444 K
  21. wmpnetwk.exe                  3296 Services                   0      6,428 K
  22. notepad++.exe                 1028 Console                    1     26,076 K
  23. chrome.exe                     340 Console                    1     63,056 K
  24. conhost.exe                   1036 Console                    1      6,716 K
  25. notepad.exe                    440 Console                    1      7,032 K
  26. YodaoDict.exe                 3448 Console                    1     27,904 K
  27. WmiPrvSE.exe                  2032 Services                   0      5,164 K
复制代码

以上基本不属于系统进程,可以删掉不影响原文。
寂寞是黑白的,但黑白不是寂寞,是永恒。BAT 需要的不是可能,而是智慧。

TOP

楼主你有一个词拼错了,虽然也不是什么严重的错误就是了:在“5.进程信息的显示格式”中的代码
  1. tasklist /fo [table|list|svc]
复制代码
应该是
  1. tasklist /fo [table|list|csv]
复制代码
查了一下,scv是Comma Separated Value逗号分隔的意思,看显示的结果,应该是这样了

TOP

返回列表