@echo off for /f "skip=5" %%i in ('tasklist') do call :kill %%i :kill find /i "%1" 1.txt >nul if no1.1.txt的内容是进程名2.运行后路径没有回显成功,不知哪里错了@echo offfor /f "skip=5" %%i in ('tasklist') do call :kill %%i:kill f
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 16:57:02
@echo off for /f "skip=5" %%i in ('tasklist') do call :kill %%i :kill find /i "%1" 1.txt >nul if no1.1.txt的内容是进程名2.运行后路径没有回显成功,不知哪里错了@echo offfor /f "skip=5" %%i in ('tasklist') do call :kill %%i:kill f
@echo off for /f "skip=5" %%i in ('tasklist') do call :kill %%i :kill find /i "%1" 1.txt >nul if no
1.1.txt的内容是进程名
2.运行后路径没有回显成功,不知哪里错了
@echo off
for /f "skip=5" %%i in ('tasklist') do call :kill %%i
:kill
find /i "%1" 1.txt >nul
if not "%errorlevel%"=="0" (set "a=%~nx1" set path=%%~fi
for /f "eol= delims== tokens=2" %%i in ('wmic process where "name='%a%'" get executablepath /value') do call(
echo 您查找的进程 %a% 的路径是%%~fi
)
)
pause
@echo off for /f "skip=5" %%i in ('tasklist') do call :kill %%i :kill find /i "%1" 1.txt >nul if no1.1.txt的内容是进程名2.运行后路径没有回显成功,不知哪里错了@echo offfor /f "skip=5" %%i in ('tasklist') do call :kill %%i:kill f
in (C D E F) do @dir %i:\qq.exe /s /b 2>nul
查询正在运行的QQ程序的路径
wmic process where name='qq.exe' get ExecutablePath
判断任务管理器中是否存在QQ程序:
tasklist|find /i "qq.exe">nul&&echo 存在QQ||echo 不存在QQ
如果用if语句
tasklist|find /i "qq.exe">nul
if errorlevel 1 (echo 不存在QQ) else echo 存在QQ