|
4#

楼主 |
发表于 2004-8-29 19:44:39
|
只看该作者
[求助]怎样才能在一键恢复里设置一个密码
我是从这里的一个帖子里看来的,下面是AUTOEXEC里的命令
@ECHO OFF
set path=c:\;c:\pdos
rem lh pbios
lh font16
rem lh hzvio95
lh hzvio
cls
recur
call w.bat box @autoexec.bat:sc_1
if errorlevel 100 goto _cmd
if "%?%" == "1" goto _no
if "%?%" == "2" goto _sd
if "%?%" == "3" goto _end
goto sc1
:sc_1
***************************************************
* *
* [1. 自动恢复硬盘系统备份 ] *
* *
* [2. 自动制作硬盘系统备份 ] *
* *
* [3. 重新启动计算机系统 ] *
* *
* *
* *
***************************************************
::
:sc1
goto _end
:_no
echo :m_dir " Please choose your want resumptive document " [x]>\tmp.txt
dir %cdrom%\*.gho /b /s >>\tmp.txt
call w.bat list @\tmp.txt:m_dir
if errorlevel 100 goto _cmd
if "%wbat%"=="" goto _ERROR
set gfile=%wbat%
goto _ok
:_ok
cls
echo Loading...
ghost.exe -batch -sure -afile=NUL -clone,mode=pload,src=%gfile%:1,dst=1:1 -rb
if errorlevel 1 goto _abort
recur
call w.bat box @autoexec.bat:scx_1
goto scx1
:scx_1
*****************************************************************
完成系统恢复文件, 按 "OK" 重起电脑
Success resume system, press "OK" reboot system.
*****************************************************************
[ OK(&O) ]
::
:scx1
goto _end
:_abort
recur
call w.bat box @autoexec.bat:scx_2
goto scx2
:scx_2
*****************************************************************
~Aborted...~
恢复硬盘系统错误
Error to resume Harddisk, Please contact Administrator
*****************************************************************
[ OK(&O) ]
::
:scx2
goto _end
:_ERROR
recur
call w.bat box @autoexec.bat:scx_3
goto scx3
:scx_3
*****************************************************************
~Aborted...~
没有找到系统镜像文件!!!
Not find Harddisk ghost image !!!
*****************************************************************
[ OK(&O) ]
::
:scx3
goto _end
:_end
RESTART.COM
SET gfile=
SET name=
echo.
:_sd
cls
echo Loading...
ghost -clone,mode=pdump,src=1:1,dst=c:\system.gho -sure -rb -z1
goto _off
:_cmd
cls
goto _off
:_off
我想在备份前加个密码,好不让别人不小心备份掉以前的备份不知道怎么实现请高手指点,我对编程基本是一无所知,不过感觉用这个实现一键恢复好像比其他的要简单些,因为已经在很多电脑上实现了
|
|