type %TEMP%\VOL.TXT|find /i "drive C"
if errorlevel 1 goto menu
:usb-hdd
cls
call w.bat box (+white on +blue) @DOS.SCR:hd
cls
if errorlevel 100 goto end
if "%?%"=="1" goto menu
[ Last edited by terse on 2007-3-25 at 09:02 AM ]作者: terse 时间: 2007-3-26 03:09 顶上去作者: chenall 时间: 2007-3-26 09:17 type %TEMP%\VOL.TXT|find /i "drive C"
if errorlevel 1 goto menu
就是如果
type %TEMP%\VOL.TXT|find /i "drive C"
返回的值大于或等于1就转到menu标签执行.
find 的返回值如果找到的就返回0没找到就返回1
这个vol.txt应该是使用vol>%temp%\vol.txt
产生的.
执行的的目录也很重要.如果执行这一句时是在C:下完成的那就会包含drive c
如果在A:下执行的就会包含drive A
[ Last edited by chenall on 2007-3-26 at 12:03 PM ]作者: terse 时间: 2007-3-26 12:32 是的 一开始就执行了 在AUTOEXEC文件里就执行了啊
vol>%temp%\vol.txt是在U盘执行的
一楼的代码是在AUTOEXEC文件后面的BAT文件