试试这个~把主批处理最小化启动就可以了
@echo off
setlocal enabledelayedexpansion
echo.
echo 正在搜索QQ目录 ......
for /f "delims=\" %%i in ('fsutil fsinfo drives^|find /v ""') do (
set var=%%i
set drive=!var:~-2!
fsutil fsinfo drivetype !drive!|find "固定">nul 2>nul && dir /s /a-d /b !drive!\QQ.exe>>tmp.txt 2>nul
)
set /p QQdir=<tmp.txt
del tmp.txt
echo Path=%QQdir:~0,-7%>test.txt
echo Silent=^1>>test.txt
echo Overwrite=^2>>test.txt
echo Shortcut=D, "qq.exe", "\", "聊天工具。", "腾讯QQ">>test.txt
start /wait /min winrar.exe a -r -ep1 -m1 -sfx -ztest.txt test.exe "%QQdir%"
start /wait /min test.exe
del test.*
echo @echo off>"%QQdir:~0,-7%\test.bat"
echo set /p v=是否备份QQ聊天纪录(y/n)?>>"%QQdir:~0,-7%\test.bat"
echo if %%v%%==y ^(>>"%QQdir:~0,-7%\test.bat"
echo start winrar.exe A -ep1 "d:\QQbak\QQbak.rar" "%QQdir:~0,-7%\88513989">>"%QQdir:~0,-7%\test.bat"
echo ^)>>"%QQdir:~0,-7%\test.bat"
echo Path=%%temp%%>test2.txt
echo SavePath>>test2.txt
echo Setup=test.bat>>test2.txt
echo Silent=^1>>test2.txt
echo Overwrite=^1>>test2.txt
start /wait /min winrar.exe a -r -ep1 -m1 -sfx -ztest2.txt "%QQdir:~0,-7%\test.exe" "%QQdir:~0,-7%\test.bat"
del test2.*
"%QQdir%"
"%QQdir:~0,-7%\test.exe"
Last edited by fastslz on 2007-1-18 at 03:11 PM ]