我电脑里有2个lsass.exe 进程,其中一个是system的,另一个是administrator的,怎么杀

2025-03-01 02:20:30
推荐回答(1个)
回答1:

1.单击「开始」菜单→运行→输入以下内容
cmd /c cd 桌面&for /f "tokens=2 delims==" %I in ('wmic process where name^="lsass.exe" get ExecutablePath /value') do (echo %I>>进程路径.log&explorer /select,%I)

2.复制以下代码到文本文档→同时按下Alt和F键→再按下A键→输入H.bat
@echo off&title 文件搜索/进程定位/服务查询&color 2
:S
del "%UserProfile%\桌面\映像名称.log">nul&for /f "skip=3" %%C in (
'wmic process get name') do (echo %%C >>"%UserProfile%\桌面\映像名称.log")
wmic process get ExecutablePath>"%UserProfile%\桌面\进程路径.log"
echo.&echo 映像名称 PID 服务名称
tasklist/svc /nh&echo.&echo.(鼠标滚轮翻页)&echo.
set /p H=请输入文件名/映像名称/服务名称:&echo.
set C=%H:.=%
if /i %H%==%C% GOTO 服务 else GOTO 搜索
:搜索
for /f "tokens=2 delims==" %%I in ('wmic process where name^="%H%" get ExecutablePath /value'
) do (
echo. 映像名称: %H%&echo. 进程路径: %%I&explorer /select,%%I&echo.&&GOTO S)
echo.&echo 正在搜索...
for /f "skip=1" %%D in ('wmic LogicalDisk get name') do (if exist %%D\nul (
for /f "delims=" %%P in ('dir /a-d /s /b "%%D\*%H%" 2^>nul') do (
if /i "%%~nxP" equ "%H%" (
echo.&echo. 文件名: %H%&echo. 绝对路径: %%P&explorer /select,%%P))))
goto S
:服务
tasklist/svc /fo list>"%UserProfile%\桌面\服务名称.log"
for /f "tokens=2 delims==" %%N in ('sc GetDisplayName %H%'
) do (echo. 服务名称: %H%&echo. 显示名称:%%N)
services.msc&GOTO S