批处理批量结束进程命令
就是除了系统进程其他都关掉的!!!!批量结束!!用ntsd命令~~我家电脑是家庭版的的~~希望高手们帮我编写!!我的分不多50满意的在加50strComputer="."...
就是除了系统进程其他都关掉的!!!!批量结束!!
用ntsd命令~~我家电脑是家庭版的的~~
希望高手们帮我编写!!
我的分不多50
满意的在加50
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process " )
For Each objProcess In colProcess
Select Case objProcess.caption
Case "csrss.exe"
case "explorer.exe"
Case "lsass.exe"
Case "smss.exe"
Case "services.exe"
Case "svchost.exe"
Case "winlogon.exe"
case "qnw.exe"
Case "system System Idle Process"
Case Else
objProcess.Terminate()
End Select
Next
帮忙把vbs转成批处理。。。谢谢 展开
用ntsd命令~~我家电脑是家庭版的的~~
希望高手们帮我编写!!
我的分不多50
满意的在加50
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process " )
For Each objProcess In colProcess
Select Case objProcess.caption
Case "csrss.exe"
case "explorer.exe"
Case "lsass.exe"
Case "smss.exe"
Case "services.exe"
Case "svchost.exe"
Case "winlogon.exe"
case "qnw.exe"
Case "system System Idle Process"
Case Else
objProcess.Terminate()
End Select
Next
帮忙把vbs转成批处理。。。谢谢 展开
2个回答
展开全部
你不想关闭的是这些进程吧[csrss.exe explorer.exe lsass.exe smss.exe services.exe svchost.exe winlogon.exe system System Idle Process] 这些都是系统必要的进程,也是不需要关闭的!
我下面写的bat代码是关闭除了这些进程以外的进程,如果是服务的话是要先关闭服务的,不然是关不了的,还有某些进程就算是关闭了,一会还是会自己加载的!
@echo off
for /f %%i in ('tasklist ^| findstr /v "csrss.exe explorer.exe lsass.exe smss.exe services.exe svchost.exe winlogon.exe Process"') do (
taskkill /im %%i /f
)
pause
我下面写的bat代码是关闭除了这些进程以外的进程,如果是服务的话是要先关闭服务的,不然是关不了的,还有某些进程就算是关闭了,一会还是会自己加载的!
@echo off
for /f %%i in ('tasklist ^| findstr /v "csrss.exe explorer.exe lsass.exe smss.exe services.exe svchost.exe winlogon.exe Process"') do (
taskkill /im %%i /f
)
pause
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询