| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 314 人关注过本帖
标题:win下的几个你所不知道的无敌命令
只看楼主 加入收藏
303788766
Rank: 1
等 级:新手上路
帖 子:167
专家分:0
注 册:2005-8-19
收藏
 问题点数:0 回复次数:0 
win下的几个你所不知道的无敌命令
问:怎么才能关掉一个用任务管理器关不了的进程?
我前段时间发现我的机子里多了一个进程,只要开机就在,我用任务管理器却怎么关也关不了


答:1.杀进程很容易,随便找个工具都行。比如IceSword。
关键是找到这个进程的启动方式,不然下次重启它又出来了。


顺便教大家一招狠的。其实用Windows自带的工具就能杀大部分进程:
c:\>ntsd&nbsp-c&nbspq&nbsp-p&nbspPID


只有System、SMSS.EXE和CSRSS.EXE不能杀。
前两个是纯内核态的,最后那个是Win32子系统,ntsd本身需要它。


ntsd从2000开始就是系统自带的用户态调试工具。被调试器附着(attach)的进程会随调试器一起退出,所以可以用来在命令行下终止进程。使用ntsd自动就获得了debug权限,从而能杀掉大部分的进程。


ntsd会新开一个调试窗口,本来在纯命令行下无法控制,但如果只是简单的命令,比如退出(q),用-c参数从命令行传递就行了。


NtsdNtsd 按照惯例也向软件开发人员提供。只有系统开发人员使用此命令。有关详细信息,请参阅&nbspNTSD 中所附的帮助文件。





usage:&nbspntsd [-?] [-2] [-d] [-g] [-G] [-myob] [-lines] [-n] [-o] [-s] [-v] [-w]
[-r&nbspBreakErrorLevel] [-t&nbspPrintErrorLevel]
[-hd] [-pd] [-pe] [-pt #] [-pv] [-x |&nbsp-x{e|d|n|i} ]
[-- |&nbsp-p&nbsppid |&nbsp-pn&nbspname |&nbspcommand-line |&nbsp-z&nbspCrashDmpFile]
[-zp&nbspCrashPageFile] [-premote&nbsptransport] [-robp]
[-aDllName] [-c "command"] [-i&nbspImagePath] [-y&nbspSymbolsPath]
[-clines #] [-srcpath&nbspSourcePath] [-QR \\machine] [-wake ]
[-remote&nbsptransport:server=name,portid] [-server&nbsptransport:portid]
[-ses] [-sfce] [-sicv] [-snul] [-noio] [-failinc] [-noshell]


where:&nbsp-?&nbspdisplays&nbspthis&nbsphelp&nbsptext
&nbspcommand-line&nbspis&nbspthe&nbspcommand&nbspto&nbsprun&nbspunder&nbspthe&nbspdebugger
&nbsp--&nbspis&nbspthe&nbspsame&nbspas&nbsp-G&nbsp-g&nbsp-o&nbsp-p&nbsp-1&nbsp-d&nbsp-pd
&nbsp-aDllName&nbspsets&nbspthe&nbspdefault&nbspextension&nbspDLL
&nbsp-c&nbspexecutes&nbspthe&nbspfollowing&nbspdebugger&nbspcommand
&nbsp-clines&nbspnumber&nbspof&nbsplines&nbspof&nbspoutput&nbsphistory&nbspretrieved&nbspby&nbspa&nbspremote&nbspclient
&nbsp-failinc&nbspcauses&nbspincomplete&nbspsymbol&nbspand&nbspmodule&nbsploads&nbspto&nbspfail
&nbsp-d&nbspsends&nbspall&nbspdebugger&nbspoutput&nbspto&nbspkernel&nbspdebugger&nbspvia&nbspDbgPrint
&nbsp-d&nbspcannot&nbspbe&nbspused&nbspwith&nbspdebugger&nbspremoting
&nbsp-d&nbspcan&nbsponly&nbspbe&nbspused&nbspwhen&nbspthe&nbspkernel&nbspdebugger&nbspis&nbspenabled
&nbsp-g&nbspignores&nbspinitial&nbspbreakpoint&nbspin&nbspdebuggee
&nbsp-G&nbspignores&nbspfinal&nbspbreakpoint&nbspat&nbspprocess&nbsptermination
&nbsp-hd&nbspspecifies&nbspthat&nbspthe&nbspdebug&nbspheap&nbspshould&nbspnot&nbspbe&nbspused
&nbspfor&nbspcreated&nbspprocesses. &nbspThis&nbsponly&nbspworks&nbspon&nbspWindows&nbspWhistler.
&nbsp-o&nbspdebugs&nbspall&nbspprocesses&nbsplaunched&nbspby&nbspdebuggee
&nbsp-p&nbsppid&nbspspecifies&nbspthe&nbspdecimal&nbspprocess&nbspId&nbspto&nbspattach&nbspto
&nbsp-pd&nbspspecifies&nbspthat&nbspthe&nbspdebugger&nbspshould&nbspautomatically&nbspdetach
&nbsp-pe&nbspspecifies&nbspthat&nbspany&nbspattach&nbspshould&nbspbe&nbspto&nbspan&nbspexisting&nbspdebug&nbspport
&nbsp-pn&nbspname&nbspspecifies&nbspthe&nbspname&nbspof&nbspthe&nbspprocess&nbspto&nbspattach&nbspto
&nbsp-pt #&nbspspecifies&nbspthe&nbspinterrupt&nbsptimeout
&nbsp-pv&nbspspecifies&nbspthat&nbspany&nbspattach&nbspshould&nbspbe&nbspnoninvasive
&nbsp-r&nbspspecifies&nbspthe (0-3)&nbsperror&nbsplevel&nbspto&nbspbreak&nbspon (SeeSetErrorLevel)
&nbsp-robp&nbspallows&nbspbreakpoints&nbspto&nbspbe&nbspset&nbspin&nbspread-only&nbspmemory
&nbsp-t&nbspspecifies&nbspthe (0-3)&nbsperror&nbsplevel&nbspto&nbspdisplay (SeeSetErrorLevel)
&nbsp-w&nbspspecifies&nbspto&nbspdebug&nbsp16&nbspbit&nbspapplications&nbspin&nbspa&nbspseparate&nbspVDM
&nbsp-x&nbspsets&nbspsecond-chance&nbspbreak&nbspon&nbspAV&nbspexceptions
&nbsp-x{e|d|n|i}&nbspsets&nbspthe&nbspbreak&nbspstatus&nbspfor&nbspthe&nbspspecified&nbspevent
&nbsp-2&nbspcreates&nbspa&nbspseparate&nbspconsole&nbspwindow&nbspfor&nbspdebuggee
&nbsp-i&nbspImagePath&nbspspecifies&nbspthe&nbsplocation&nbspof&nbspthe&nbspexecutables&nbspthat&nbspgenerated
&nbspthe&nbspfault (see&nbsp_NT_EXECUTABLE_IMAGE_PATH)
&nbsp-lines&nbsprequests&nbspthat&nbspline&nbspnumber&nbspinformation&nbspbe&nbspused&nbspif&nbsppresent
&nbsp-myob&nbspignores&nbspversion&nbspmismatches&nbspin&nbspDBGHELP.DLL
&nbsp-n&nbspenables&nbspverbose&nbspoutput&nbspfrom&nbspsymbol&nbsphandler
&nbsp-noio&nbspdisables&nbspall&nbspI/O&nbspfor&nbspdedicated&nbspremoting&nbspservers
&nbsp-noshell&nbspdisables&nbspthe&nbsp.shell (!!)&nbspcommand
&nbsp-QR <\\machine>&nbspqueries&nbspfor&nbspremote&nbspservers
&nbsp-s&nbspdisables&nbsplazy&nbspsymbol&nbsploading
&nbsp-ses&nbspenables&nbspstrict&nbspsymbol&nbsploading
&nbsp-sfce&nbspfails&nbspcritical&nbsperrors&nbspencountered&nbspduring&nbspfile&nbspsearching
&nbsp-sicv&nbspignores&nbspthe&nbspCV&nbsprecord&nbspwhen&nbspsymbol&nbsploading
&nbsp-snul&nbspdisables&nbspautomatic&nbspsymbol&nbsploading&nbspfor&nbspunqualified&nbspnames
&nbsp-srcpath&nbspspecifies&nbspthe&nbspsource&nbspsearch&nbsppath
&nbsp-v&nbspenables&nbspverbose&nbspoutput&nbspfrom&nbspdebugger
&nbsp-wake&nbspwakes&nbspup&nbspa&nbspsleeping&nbspdebugger&nbspand&nbspexits
&nbsp-y&nbspspecifies&nbspthe&nbspsymbol&nbspsearch&nbsppath (see&nbsp_NT_SYMBOL_PATH)
&nbsp-z&nbspspecifies&nbspthe&nbspname&nbspof&nbspa&nbspcrash&nbspdump&nbspfile&nbspto&nbspdebug
&nbsp-zp&nbspspecifies&nbspthe&nbspname&nbspof&nbspa&nbsppage.dmp&nbspfile
&nbspto&nbspuse&nbspwith&nbspa&nbspcrash&nbspdump
&nbsp-remote&nbsplets&nbspyou&nbspconnect&nbspto&nbspa&nbspdebugger&nbspsession&nbspstarted&nbspwith&nbsp-server
&nbspmust&nbspbe&nbspthe&nbspfirst&nbspargument&nbspif&nbsppresent
&nbsptransport:&nbsptcp |&nbspnpipe |&nbspssl |&nbspspipe |&nbsp1394 |&nbspcom
&nbspname:&nbspmachine&nbspname&nbspon&nbspwhich&nbspthe&nbspdebug&nbspserver&nbspwas&nbspcreated
&nbspportid:&nbspid&nbspof&nbspthe&nbspport&nbspthe&nbspdebugger&nbspserver&nbspwas&nbspcreated&nbspon
&nbspfor&nbsptcp&nbspuse: &nbspport=
&nbspfor&nbspnpipe&nbspuse: &nbsppipe=
&nbspfor&nbsp1394&nbspuse: &nbspchannel=
&nbspfor&nbspcom&nbspuse: &nbspport=,baud=,
&nbspchannel=
&nbspfor&nbspssl&nbspand&nbspspipe&nbspsee&nbspthe&nbspdocumentation
&nbspexample:&nbsp...&nbsp-remote&nbspnpipe:server=yourmachine,pipe=foobar
&nbsp-server&nbspcreates&nbspa&nbspdebugger&nbspsession&nbspother&nbsppeople&nbspcan&nbspconnect&nbspto
&nbspmust&nbspbe&nbspthe&nbspfirst&nbspargument&nbspif&nbsppresent
&nbsptransport:&nbsptcp |&nbspnpipe |&nbspssl |&nbspspipe |&nbsp1394 |&nbspcom
&nbspportid:&nbspid&nbspof&nbspthe&nbspport&nbspremote&nbspusers&nbspcan&nbspconnect&nbspto
&nbspfor&nbsptcp&nbspuse: &nbspport=
&nbspfor&nbspnpipe&nbspuse: &nbsppipe=
&nbspfor&nbsp1394&nbspuse: &nbspchannel=
&nbspfor&nbspcom&nbspuse: &nbspport=,baud=,
&nbspchannel=
&nbspfor&nbspssl&nbspand&nbspspipe&nbspsee&nbspthe&nbspdocumentation
&nbspexample:&nbsp...&nbsp-server&nbspnpipe:pipe=foobar
&nbsp-premote&nbsptransport&nbspspecifies&nbspthe&nbspprocess&nbspserver&nbspto&nbspconnect&nbspto
&nbsptransport&nbsparguments&nbspare&nbspgiven&nbspas&nbspwith&nbspremoting


Environment&nbspVariables:


&nbsp_NT_SYMBOL_PATH=[Drive:][Path]
&nbspSpecify&nbspsymbol&nbspimage&nbsppath.


&nbsp_NT_ALT_SYMBOL_PATH=[Drive:][Path]
&nbspSpecify&nbspan&nbspalternate&nbspsymbol&nbspimage&nbsppath.


&nbsp_NT_DEBUGGER_EXTENSION_PATH=[Drive:][Path]
&nbspSpecify&nbspa&nbsppath&nbspwhich&nbspshould&nbspbe&nbspsearched&nbspfirst&nbspfor&nbspextensions&nbspdlls


&nbsp_NT_EXECUTABLE_IMAGE_PATH=[Drive:][Path]
&nbspSpecify&nbspexecutable&nbspimage&nbsppath.


&nbsp_NT_SOURCE_PATH=[Drive:][Path]
&nbspSpecify&nbspsource&nbspfile&nbsppath.


&nbsp_NT_DEBUG_LOG_FILE_OPEN=filename
&nbspIf&nbspspecified,&nbspall&nbspoutput&nbspwill&nbspbe&nbspwritten&nbspto&nbspthis&nbspfile&nbspfrom&nbspoffset&nbsp0.


&nbsp_NT_DEBUG_LOG_FILE_APPEND=filename
&nbspIf&nbspspecified,&nbspall&nbspoutput&nbspwill&nbspbe&nbspAPPENDed&nbspto&nbspthis&nbspfile.


&nbsp_NT_DEBUG_HISTORY_SIZE=size
&nbspSpecifies&nbspthe&nbspsize&nbspof&nbspa&nbspserver's&nbspoutput&nbsphistory&nbspin&nbspkilobytes


Control&nbspKeys:


&nbspQuit&nbspdebugger
&nbspBreak&nbspinto&nbspTarget
&nbspForce&nbspa&nbspbreak&nbspinto&nbspdebuggee (same&nbspas&nbspCtrl-C)
&nbspDebug&nbspCurrent&nbspdebugger
&nbspToggle&nbspVerbose&nbspmode
&nbspPrint&nbspversion&nbspinformation
ntsd:&nbspexiting&nbsp-&nbsppress&nbspenter&nbsp---


用法:开个cmd.exe窗口,输入:
ntsd&nbsp-c&nbspq&nbsp-p&nbspPID


把最后那个PID,改成你要终止的进程的ID。


如果你不知道进程的ID,任务管理器-》进程选项卡-》查看-》选择列-》
勾上"PID(进程标识符)",然后就能看见了。


2.xp下还有两个好东东
tasklist和tskill
tasklist能列出所有的进程,和相应的信息
tskill能查杀进程le
语法很简单
tskill 程序名!!
搜索更多相关主题的帖子: win 命令 
2005-11-29 09:49
快速回复:win下的几个你所不知道的无敌命令
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024531 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved