| 
 | 
 
关于MAXDOS工具箱 GH.bat 
    MAXDOS V8 工具箱在我的电脑中使用有点问题, 
即:进入工具箱后只要输入R(重启)或S(关机) 
就无任何反映,键盘.鼠标均无法操作。因此只能选用 
其它了,但难舍该工具箱中的中文GHOST, 
提取MAXDOS.img修改后有一处功能无法实现 
即:在备份\还原选项中的-重新启动计算机。 
望高手们帮我解决下! 
修改后的GH.bat代码: 
@echo off 
if "%RamDrive%"=="" goto _cer 
lh tway.exe /np /nw >nul 
lh ctmouse >nul 
go %RamDrive%\ 
:_top1 
for %%a in (numhds allsize active hd_id hd_ap hd_ep hdpos errxx _goto) do set %%a= 
for %%a in (rd rp bd bp fp rb jx ys sp pwd) do set %%a= 
for %%a in (1 2 3 4 5 6 7 8 9) do set cs%%a= 
for %%a in (1 2 3 4 5 6 7 8 9) do set WCB%%a= 
cls 
call w.bat box @GH.bat:_backup 
for %%a in (1 2 3 4 5 6 7) do if "%?%"=="%%a" goto _gmenu_%%a 
goto _ext 
:_gmenu_1 
set _goto=_res 
goto _hd_id 
:_res 
cls 
call w.bat box @GH.bat:_atr1 #1,15 
if "%?%"=="1" ghost.exe -clone,mode=pload,src=%hd_id%:%hd_ep%\win.gho:1,dst=%hd_id%:%hd_ap% -sure -no1394 -nousb -noide -rb 
if "%?%"=="1" goto _top1 
if "%numhds%"=="1" goto _top1 
if not "%numhds%"=="1" goto _listhd 
:_gmenu_2 
set _goto=_baks 
goto _hd_id 
:_baks 
cls 
call w.bat box @GH.bat:_atr2 #1,15 
if "%?%"=="1" ghost.exe -clone,mode=pdump,src=%hd_id%:%hd_ap%,dst=%hd_id%:%hd_ep%\win.gho -sure -z3 -split=3998 -no1394 -nousb -noide 
if "%?%"=="1" goto _top1 
if "%numhds%"=="1" goto _top1 
if not "%numhds%"=="1" goto _listhd 
:_gmenu_3 
set bd=1 
set bp=2 
set jx=win 
set fp=1 
set rd=1 
set rp=1 
set ys=3 
set sp=3998 
set WCB1= 
if "%_goto%"=="_gstcnb" goto _gstcnb 
:_gstcnr 
set _goto=_gstcnr 
set rb= 
cls 
call w.bat box @GH.bat:_gstcnrm 
if "%?%"=="1" goto _gstcnr 
if "%?%"=="2" goto _gstcnb 
if "%?%"=="3" goto _gstr 
if "%?%"=="4" goto _gmenu_3 
goto _top1 
:_gstcnb 
set _goto=_gstcnb 
set pwd= 
cls 
call w.bat box @GH.bat:_gstcnbm #2 
if "%?%"=="1" goto _gstcnr 
if "%?%"=="2" goto _gstcnb 
if "%?%"=="3" goto _gstb 
if "%?%"=="4" goto _gmenu_3 
goto _top1 
:_gstr 
set errxx= 
if "%WCB1%"=="1" set rb=-rb 
func -i%bd% 
if errorlevel 100 set errxx=GHO 镜像所在硬盘值 %bd% 格式错误! 
if not "%errxx%"=="" goto _err 
func -i%bp% 
if errorlevel 100 set errxx=GHO 镜像所在分区值 %bp% 格式错误! 
if not "%errxx%"=="" goto _err 
func -f%jx% 
if errorlevel 100 set errxx=GHO 镜像文件的名称 %jx% 格式错误! 
if not "%errxx%"=="" goto _err 
func -i%fp% 
if errorlevel 100 set errxx=GHO 镜像里的分区值 %fp% 格式错误! 
if not "%errxx%"=="" goto _err 
func -i%rd% 
if errorlevel 100 set errxx=接受还原的硬盘值 %rd% 格式错误! 
if not "%errxx%"=="" goto _err 
func -i%rp% 
if errorlevel 100 set errxx=接受还原的分区值 %rp% 格式错误! 
if not "%errxx%"=="" goto _err 
ghost.exe -clone,mode=pload,src=%bd%:%bp%\%jx%.gho:%fp%,dst=%rd%:%rp% -sure -no1394 -nousb -noide %rb% 
goto _top1 
:_gstb 
set errxx= 
if "%WCB1%"=="1" set pwd=-pwd 
func -i%rd% 
if errorlevel 100 set errxx=接受备份的硬盘值 %rd% 格式错误! 
if not "%errxx%"=="" goto _err 
func -i%rp% 
if errorlevel 100 set errxx=接受备份的分区值 %rp% 格式错误! 
if not "%errxx%"=="" goto _err 
func -i%bd% 
if errorlevel 100 set errxx=GHO 镜像所在硬盘值 %bd% 格式错误! 
if not "%errxx%"=="" goto _err 
func -i%bp% 
if errorlevel 100 set errxx=GHO 镜像所在分区值 %bp% 格式错误! 
if not "%errxx%"=="" goto _err 
func -f%jx% 
if errorlevel 100 set errxx=GHO 镜像文件的名称 %jx% 格式错误! 
if not "%errxx%"=="" goto _err 
if "%ys%"=="0" set ys= 
if not "%ys%"=="" func -i%ys% 
if errorlevel 100 set errxx=压缩率输入值 %ys% 格式错误! 
if not "%errxx%"=="" goto _err 
if "%sp%"=="" set sp=0 
func -i%sp% 
if errorlevel 100 set errxx=分卷大小值 %sp% 格式错误! 
if not "%errxx%"=="" goto _err 
ghost.exe -clone,mode=pdump,src=%rd%:%rp%,dst=%bd%:%bp%\%jx%.gho -sure -z%ys% -split=%sp% -no1394 -nousb -noide %pwd% 
goto _top1 
:_gmenu_4 
for %%a in (1 2 3 4 5 6 7 8 9) do set cs%%a= 
for %%a in (1 2 3 4 5 6 7 8 9) do set WCB%%a= 
cls 
call w.bat box @GH.bat:_gstm #10 
if "%?%"=="1" goto _gst1 
if "%?%"=="2" goto _gmenu_4 
goto _top1 
:_gst1 
if "%WCB1%"=="1" set cs1=-fro 
if "%WCB2%"=="1" set cs2=-crcignore 
if "%WCB3%"=="1" set cs3=-forceusb 
if "%WCB4%"=="1" set cs4=-force1394 
if "%WCB5%"=="1" set cs5=-noide 
if "%WCB6%"=="1" set cs6=-nousb 
if "%WCB7%"=="1" set cs7=-no1394 
if "%WCB8%"=="1" set cs8=-noscsi 
ghost.exe %cs1% %cs2% %cs3% %cs4% %cs5% %cs6% %cs7% %cs8% %cs9% 
goto _top1 
:_gmenu_5 
cls 
call w.bat box @GH.bat:_1to2e #2 
if "%?%"=="1" goto _ent1to2 
goto _top1 
:_ent1to2 
ghost.exe -clone,mode=copy,src=1,dst=2 -sure -szee -no1394 -nousb 
goto _top1 
:_gmenu_6 
cls 
call w.bat box @GH.bat:_2to1e #2 
if "%?%"=="1" goto _ent2to1 
goto _top1 
:_ent2to1 
ghost.exe -clone,mode=copy,src=2,dst=1 -sure -szee -no1394 -nousb 
goto _top1 
:_gmenu_7 
cls 
call w.bat box @GH.bat:_1ito2e #2 
if "%?%"=="1" goto _qr1ito2 
goto _top1 
:_qr1ito2 
ghost.exe -clone,mode=create,src=1,dst=2:1\win.gho -sure -z3 -split=3998 -no1394 -nousb 
goto _top1 
:_hd_id 
if exist %temp%\ghd_id.txt del %temp%\ghd_id.txt 
if exist %temp%\findlast.bat del %temp%\findlast.bat 
if exist %RamDrive%\ghststat.txt del %RamDrive%\ghststat.txt 
aefdisk /y /numhds >nul 
if errorlevel 1 goto _listhd 
set n=0 
set i=%numhds% 
:_hdxh 
call var set n=%n%+1 
aefdisk %n% /y /allsize >nul 
if not "%allsize%"=="" set numhds=%n% 
set allsize= 
if "%n%"=="%i%" goto _outhdxh 
goto _hdxh 
:_outhdxh 
set n= 
set i= 
if "%numhds%"=="1" set hd_id=1 
if "%numhds%"=="1" goto _hd_ap 
:_listhd 
set hd_id= 
for %%a in (2 3 4 5 6 7 8) do if "%numhds%"=="%%a" set hd_id=more 
if not "%hd_id%"=="more" set errxx=系统未检测到硬盘驱动器! 
if not "%hd_id%"=="more" goto _err1 
set hd_id=0 
echo :_hds "请选择需要操作的硬盘(1~%numhds%)">%temp%\ghd_id.txt 
:_hdloop 
call var set hd_id=%hd_id%+1 
aefdisk %hd_id% /y /allsize >nul 
echo 第 %hd_id% 硬盘 : 总容量 %allsize% MB>>%temp%\ghd_id.txt 
if "%hd_id%"=="%numhds%" goto _outhdlp 
goto _hdloop 
:_outhdlp 
cls 
call w.bat list @%temp%\ghd_id.txt:_hds #%hdpos%+1 
if Errorlevel 100 goto _top1 
set hd_id=%?% 
Set hdpos=%?% 
:_hd_ap 
cls 
echo. 
echo 正在检测第 %hd_id% 硬盘主激活分区及Ghost可识别的最后分区, 请稍等... 
aefdisk %hd_id% /putactive 
if errorlevel 1 goto _top1 
set hd_ap=%active% 
if "%hd_ap%"=="0" set errxx=第 %hd_id% 硬盘未检测到主激活分区! 
if "%hd_ap%"=="0" goto _err1 
:_hd_ep 
ghost.exe -dd >nul 
echo :_1>%temp%\findlast.bat 
echo find /i "%hd_id%.%%1:" ghststat.txt>>%temp%\findlast.bat 
echo if errorlevel 1 goto _2>>%temp%\findlast.bat 
echo set hd_ep=%%1>>%temp%\findlast.bat 
echo Shift>>%temp%\findlast.bat 
echo goto _1>>%temp%\findlast.bat 
echo :_2>>%temp%\findlast.bat 
call findlast.bat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 
if "%hd_ap%"=="%hd_ep%" set errxx=Ghost 可识别最后分区与主激活分区为同一分区! 
if "%hd_ap%"=="%hd_ep%" goto _err1 
if exist %temp%\ghd_id.txt del %temp%\ghd_id.txt 
if exist %temp%\findlast.bat del %temp%\findlast.bat 
if exist %RamDrive%\ghststat.txt del %RamDrive%\ghststat.txt 
goto %_goto% 
:_err 
call w.bat box @GH.bat:_err_0 
goto %_goto% 
:_err1 
call w.bat box @GH.bat:_err_1 
goto _top1 
:_backup " Ghost 备份/还原系统菜单  " 
        [    &R. 自动执行系统还原     ] 
        [    &B. 自动执行系统备份     ] 
    ─────────────────── 
        [    1. 中文自定义操作项     ] 
        [    2. Ghost 手动操作项     ] 
        [    3. 重新 启动 计算机     ] 
━━━━━━━━━━━━━━━━━━━━━━━ 
自动执行项的~备份点~被预置为Ghost 可识别的最后 
分区根目录, ~还原点~被预置为同一硬盘主激活分区 
:: 
:_atr1 "注意:己处于还原系统界面!!" 
如果第 ~%hd_id%~ 硬盘第 ~%hd_ep%~ 分区根目录存在 ~win.gho~ 镜像, 
按"开始"将自动还原此系统镜像至第 ~%hd_id%~ 硬盘第 ~%hd_ap%~ 分区, 
还原后此分区的所有资料将被覆盖,注意:一旦点击"开始"将不可逆! 
程序默认于 ~#?~秒后自动执行"开始"选项——还原系统! 
          [ 开始(&S) ]        [ 终止(&C) ] 
:: 
:_atr2 "注意:己处于备份系统界面!!" 
按"开始"将自动备份第 ~%hd_id%~ 硬盘第 ~%hd_ap%~ 分区的系统资料至 
第 ~%hd_id%~ 硬盘第 ~%hd_ep%~ 分区根目录, 保存为 ~win.gho~ 镜像, 
如果此镜像文件己存在将被覆盖,注意:一旦点击"开始"将不可逆! 
程序默认于 ~#?~秒后自动执行"开始"选项——备份系统! 
          [ 开始(&S) ]        [ 终止(&C) ] 
:: 
:_gstcnrm "  备份/还原系统中文自定义操作界面  " 
  [ &R. 系统还原界面 ]    [ &B. 系统备份界面 ] 
────────处于~还原~界面──────── 
将第 [$bd,1] 硬盘第 [$bp,1] 分区:\[$jx,8 ].GHO 
~~ 还原 ~~ 
到第 [$rd,1] 硬盘第 [$rp,1] 分区 
─────────── 
还原后自动重启计算机: [!] 
━━━━━━━━━━━━━━━━━━━━━━━ 
  [ 执行(&Y) ]    [ 重选(&C) ]    [ 返回(&N) ] 
:: 
:_gstcnbm "  备份/还原系统中文自定义操作界面  " 
  [ &R. 系统还原界面 ]    [ &B. 系统备份界面 ] 
────────处于~备份~界面──────── 
将第 [$rd,1] 硬盘第 [$rp,1] 分区 
~~ 备份 ~~ 
到第 [$bd,1] 硬盘第 [$bp,1] 分区:\[$jx,8 ].GHO 
─────────── 
压缩率1-9: [$ys,1]  分卷值: [$sp,4] MB  是否密码: [!] 
━━━━━━━━━━━━━━━━━━━━━━━ 
  [ 执行(&Y) ]    [ 重选(&C) ]    [ 返回(&N) ] 
:: 
:_gstm "  Ghost 手动操作附加参数选择  " 
  空格键按需选择下列常用参数附带启动, 留空则空参执行程序 
───────────────────────────── 
  [!] ~-FRO~        备份系统时强制拷贝发现坏簇的目标分区 
  [!] ~-CRCIGNORE~  还原系统时忽略掉GHO 镜像文件中的错误 
  [!] ~-FORCEUSB~   此参数用于启用程序内置的USB 设备驱动 
  [!] ~-FORCE1394~  此参数用于启用程序内置的1394设备驱动 
  [!] ~-NOIDE~      此参数用于禁止程序使用ASPI存取IDE 设备 
  [!] ~-NOUSB~      此参数用于禁止程序使用ASPI存取USB 设备 
  [!] ~-NO1394~     此参数用于禁止程序使用ASPI存取1394设备 
  [!] ~-NOSCSI~     此参数用于禁止程序使用ASPI存取SCSI设备 
  或自行输入参数如: ~-IA -ID -PWD~ [$cs9,99              ] 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 
      [ 执行(&Y) ]      [ 重选(&C) ]      [ 返回(&N) ] 
:: 
:: 
:_err_0 "错误!!请重新正确输入!!" 
          !![错误]!! 
%errxx% 
按任意键返回界面重新正确输入 
:: 
:_err_1 "错误!!硬盘及分区未通过检测!!" 
          !![错误]!! 
%errxx% 
按任意键返回备份还原系统菜单 
goto _end 
 
[ 本帖最后由 tzj_2 于 2010-12-29 10:13 编辑 ] |   
 
 
 
 |