我给别人安了个一键恢复的东西。我想让他在选择的时候会出现密码验证。防止误操作。但是我在dos下运行。它不会出现密码验证,直接执行ghost了。如果这个程序只能运行在cmd下的话。那么dos下该怎么写。
@echo off
path=c:\;c:\ghost;
smartdrv.exe
if "%config%"=="restore" goto restore
:restore
set /p pw=请输入管理员密码:
@if "%pw%"=="123" goto :ghost
exit
:ghost
ghost.exe -clone,mode=pload,src=c:\system.gho:1,dst=1:1 -sure -fx
goto quit
:quit
其中if "%config%"=="restore"是从config.sys中跳转过来的.
@echo off
path=c:\;c:\ghost;
smartdrv.exe
if "%config%"=="restore" goto restore
:restore
set /p pw=请输入管理员密码:
@if "%pw%"=="123" goto :ghost
exit
:ghost
ghost.exe -clone,mode=pload,src=c:\system.gho:1,dst=1:1 -sure -fx
goto quit
:quit
其中if "%config%"=="restore"是从config.sys中跳转过来的.

