|
8#
楼主 |
发表于 2004-8-22 23:10:26
|
只看该作者
用gdisk执行批处理命令进行自动分区出了点错,望大家指正!
下面引用由wzjcyr在 2004/08/22 05:06pm 发表的内容:
请继续这个思路,从分区-格式化-GHOST只需要1键!专门用于安装新机器!
(GDISK分区后不知可不可以不用重启!) gdisk分区格式化后是可以不重启的,只要你不用“/R”参数。
实现“分区-格式化-ghost只需要1键”也很容易的。按照下面这个批处理Autoexec.bat文件中的内容就可以实现了:
@ECHO OFF
set EXPAND=YES
SET DIRCMD=/O:N
set LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15
set LglDrv=%LglDrv% O 14 N 13 M 12 L 11 K 10 J 9 I 8 H 7 G 6 F 5 E 4 D 3 C
cls
call setramd.bat %LglDrv%
set temp=c:\
set tmp=c:\
path=%RAMD%:\;a:\;%CDROM%:\
copy command.com %RAMD%:\ > NUL
set comspec=%RAMD%:\command.com
copy extract.exe %RAMD%:\ > NUL
copy readme.txt %RAMD%:\ > NUL
:ERROR
IF EXIST ebd.cab GOTO EXT
echo Please insert Windows 98 Startup Disk 2
echo.
pause
GOTO ERROR
:EXT
%RAMD%:\extract /y /e /l %RAMD%: ebd.cab > NUL
echo The diagnostic tools were successfully loaded to drive %RAMD%.
echo.
IF "%config%"=="NOCD" GOTO QUIT
IF "%config%"=="HELP" GOTO HELP
LH %ramd%:\MSCDEX.EXE /D:mscd001 /L:%CDROM%
echo.
GOTO QUIT
:HELP
cls
call help.bat
echo Your computer will now restart and the startup menu will appear.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
restart.com
GOTO QUIT
:QUIT
echo To get help, type HELP and press ENTER.
echo.
rem Clean up environment variables
rem set CDROM=
rem set LglDrv=
%ramd%:
gdisk 1 /del /all
gdisk 1 /cre /pri /sz:12p /for /q
gdisk 1 /cre /ext
gdisk 1 /cre /log /sz:30p /for /q
gdisk 1 /cre /log /sz:20p /for /q
gdisk 1 /cre /log /sz:20p /for /q
gdisk 1 /cre /log /for /q
GHOST -clone,mode=pload,src=%cdrom%:\win98.gho:1,dst=1:1 -f32 -sure -rb |
|