回复 [url=http://bbs.bathome.net/redirect.php?goto=find
你好,我有如下代码,我也知道 有空格要加 引号,但是我加了引号,在实际 使用中,有 空格还是会导致只能取得空格前面的,- set /p gn=请拖入程序获取程序名:
- call :gf "%gn%"
- :gf
- set ee=%~nx1
- echo @echo off>file\a.bat
- echo rem 注册内容>>file\a.bat
- echo tasklist^|findstr /i "%ee%"^&taskkill /f /im "%ee%">>file\a.bat
- echo call "%ee%" >>file\a.bat
- echo :a>>file\a.bat
- echo set a=>>file\a.bat
- echo tasklist^|findstr /i "%ee%"^>nul 2^>nul^&^&set b==^|^|set a==>>file\a.bat
- echo if "%%a%%%%b%%"=="==" (>>file\a.bat
- echo rem 删除注内容>>file\a.bat
- echo cd..^&rd /s/q "%%~dp0">>file\a.bat
- echo del /q /f "%%~f0" 2>nul>>file\a.bat
- echo exit>>file\a.bat
- echo )else (>>file\a.bat
- echo ping 127.1 -n 2 ^>nul>>file\a.bat
- echo goto:a>>file\a.bat
- echo )>>file\a.bat
- goto ddd
复制代码 post&pid=1294&ptid=408]1#[/url] youxi01 |