移动硬盘的Dos下盘符是C,现在启动后能够找到变量%upan%是Z
批处理如下:
@echo off
path=a:\;c:\;d:;
lh ctmouse
call MOUSCLIP.EXE
devload USBASPI.SYS /v /e /norst
devload di1000dd.sys /dR
devload USBCD.SYS /D:usbcd
shsucdx /d:usbcd
tw /np /nm /nw >nul
cls
@echo ******* 警告!!!*******
@echo.
@echo * 如果还原C盘,C盘上的数据将全部丢失,并且不可以轻易找回!
@echo.
@echo * 你确定覆盖C盘吗 (Y/N)? 是按Y键,否按N键。
@echo.
@echo * 按Y键开始还原,并返回到DOS状态!按N键退出分区,返回到DOS状态!
@echo.
@echo * 在DOS状态下,按R键重启计算机,按S键关机!!
@echo -----------------------------------------------------------------
@choice /c:YN /N
@if errorlevel==2 goto M_QUIT
@if errorlevel==1 goto M_GHOST
:M_GHOST
set bootdir=boot
set flag=%bootdir%\ludun
set upan=r
if exist %upan%:\%flag% goto Ufind
set upan=s
if exist %upan%:\%flag% goto Ufind
set upan=t
if exist %upan%:\%flag% goto Ufind
set upan=u
if exist %upan%:\%flag% goto Ufind
set upan=v
if exist %upan%:\%flag% goto Ufind
set upan=w
if exist %upan%:\%flag% goto Ufind
set upan=x
if exist %upan%:\%flag% goto Ufind
set upan=y
if exist %upan%:\%flag% goto Ufind
set upan=z
if exist %upan%:\%flag% goto Ufind
:Ufind
@echo U盘盘符是%upan%:
pause
ghost -clone,mode=pload,src=%upan%:\xp.gho,dst=2:1 -crcignore -sure -fx
:M_QUIT
[ 本帖最后由 鲁钝 于 2009-10-7 21:26 编辑 ] |