| 
 | 
回复 #1 jiyuquan 的帖子
我这里有一个已经做好了的,可以拿去参考一下。 
@echo off 
set v=0 
set w=0 
set x=0 
set y=0 
set z=0 
set g=0 
for /f "eol=D tokens=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 delims=[]\ " %%a in ('x:\tools\GHOST\omnifs32.exe info') do ( 
if %%i==CASE_Z set g=%%d 
if %%a%%i==1.1:CASE_Z set y=1 
if %%a%%i==2.1:CASE_Z set x=1 
if %%a==2.1: set v=1 
if %%a==1.1: set v=1 
if %%a==3.1: set z=1 
if %%a==1.2: set w=1 
if %%a==2.2: set w=1 
) 
 
 
if %v%==0 call :nohd 
if %z%==1 call :fail 
if %w%==0 call :fenqu 
if %x%==1 call :more 
if %y%==1 call :less 
 
goto error 
pause>>nul 
 
:fail 
pecmd MESS 存在2个或更多硬盘,为确保数据安全,请手动运行Ghost. @出错啦!#OK *10000 
goto end 
 
:less 
x:\tools\GHOST\GHOST32_1102.exe -noide -clone,mode=pload,dst=2:1,src=%g%\system\CASE3.GHO:1 -batch -sure -rb 
goto end 
 
:more 
x:\tools\GHOST\GHOST32_1102.exe -noide -clone,mode=pload,dst=1:1,src=%g%\system\CASE3.GHO:1 -batch -sure -rb 
goto end 
 
:fenqu 
pecmd MESS 请检查硬盘是否已经分区或存在问题. @出错啦!#OK *10000 
goto end 
 
:nohd 
pecmd MESS 没有找到硬盘. @出错啦!#OK *10000 
goto end 
 
:error 
pecmd MESS 未知的错误. @出错啦!#OK *10000 
goto end 
 
:end 
exit |   
 
 
 
 |