|
看来大家对这个很有兴趣,把俺的笨方法贴出来大家看看吧!
backup.bat (自动备份到HPA分区)
-----------------------------------------------------------
@echo off
XMSDSK 4096 /Y >nul
FINDRAMD >NUL
MD %RAMDRIVE%\TEMP
SET TMP=%RAMDRIVE%\TEMP
SET TEMP=%RAMDRIVE%\TEMP
COPY COMMAND.COM %RAMDRIVE%\ >NUL
PATH=%RAMDRIVE%\;%PATH%
SET COMSPEC=%RAMDRIVE%\COMMAND.COM
copy /y A:\ghost.exe %RAMDRIVE%\ >NUL
copy /y a:\finddrv.bat %RAMDRIVE%\ >NUL
copy /y a:\find.com %RAMDRIVE%\ >NUL
%RAMDRIVE%\
ghost -dd >NUL
set p=1
call FINDDRV.bat 1 2 3 4 5 6 7 8 9 10 11 12 13 14
ghost -clone,mode=pdump,src=1:1,dst=%hpadrive%:\System.gho -z5 -fx -sure -rb
-----------------------------------------------------------
recover.bat (从HPA从分区自动恢复)
-----------------------------------------------------------
@echo off
XMSDSK 2048 /Y >nul
FINDRAMD >NUL
MD %RAMDRIVE%\TEMP
SET TMP=%RAMDRIVE%\TEMP
SET TEMP=%RAMDRIVE%\TEMP
COPY COMMAND.COM %RAMDRIVE%\ >NUL
PATH=%RAMDRIVE%\;%PATH%
SET COMSPEC=%RAMDRIVE%\COMMAND.COM
copy /y A:\ghost.exe %RAMDRIVE%\ >NUL
copy /y a:\finddrv.bat %RAMDRIVE%\ >NUL
copy /y a:\find.com %RAMDRIVE%\ >NUL
%RAMDRIVE%\
ghost -dd >NUL
set p=1
call FINDDRV.bat 1 2 3 4 5 6 7 8 9 10 11 12 13 14
ghost -clone,mode=pload,src=%hpadrive%:\System.gho:1,dst=1:1 -fx -sure -rb
----------------------------------------------------------------------
寻找HPA分区定义为环境变量:
-----------------------------------------------------------------------
:1
FIND /i "%p%:%1" GHSTSTAT.TXT >NUL
if errorlevel 1 goto 2
set hpadrive=%p%:%1
Shift
goto 1
:2
----------------------------------------------------------------
[ 本帖最后由 天风 于 2006-11-1 10:52 AM 编辑 ] |
|