type test.bat
@echo off
rem 检测备份分区 设置Drive为备份分区盘符
SET Drive=null
for %%z in (c d e f g h i j k l m n o p q r s t u v w ) do call 1.bat %%z >nul
if %Drive%==null goto exit
goto boot
:exit
echo 不存在备份分区,安装中止!
pause && exit
:boot
echo 备份分区盘符为:%Drive%
pause
type 1.bat
@echo off
vol %1: |find "1KEYRESTORE" >nul
if errorlevel 1 goto exit
SET Drive=%1:
:exit
这两代代码 能找出 具体卷标的 那个 盘的盘符,
但在 运行过程 中 会因为 没有的盘 而显示出来一个错误提示:
Invalid drive specification
我如何 才能屏蔽这个提示?
Last edited by ww111222 on 2007-8-19 at 03:52 PM ]