You are presuming we have access to Partition Magic and Ghost!
I\'ve created a auto loading disk that uses a free version of FDISK that is scriptable. It can automatically remove existing partitions and create new ones of any size. The program is at the following URL:
http://www.23cc.com/free-fdisk/ There is a newer version of the program on this site then I have tested, however everything should work as listed.
Granted, this creates a FAT disk (either 16 or 32) for later conversion to NTFS (if required), but it still uses free utilities.
Basically I got the idea from Windows Admin Scripting Little Black Book. My script uses ideas from the book and a modified version of the Win98 recovery disk. It boots to a basic install without CD-ROM drivers loaded and tests to see if the hard drive has already been FDISK\'d.
If the drive hasn\'t been formatted, it calls the Free-FDISK program to clear the partitions, reapplies new ones to whatever size you select by the option switches, then reboots.
During the reboot, the system loads the CD-ROM drivers. The existence of a test file indicates the drive has been FDISK\'d. The script starts formatting with the MS-DOS format commands undocumented /autotest switch.
Then using standard uninstall.txt files or MSBATCH.INF files, you can start your automatic install of NT/Win9X, etc... My example uses a network load point, but it is easily modified to use the CD
I used this script extensively when I shut down a corporate office recently. I had to reload all the PC\'s with a standard download so they could be sold. I set up a download on a network sharepoint, setup an automatic, random machine name generator, created multiple copies of this bootdisk and did a complete format/reload of over two dozen systems at the same time.
My sample script uses 3Com networking cards because they have a utility that tests for the differenct types of cards and can branch to a different link based on which card is present. I modified this script for home use and included a branch for Intel\'s NIC cards also, but now can\'t find the disk I modified.
My home disk also tests for the presence of a second hard disk, and if it detects one, offers to FDISK and format that one as well.
Example script follows: (Please note, it is a compilation of two different scripts, a CD-ROM boot and a network boot, combined just in this posting. I am aware of the fact I don\'t need CD-ROM drivers to do a network load. Also because of the way I combined the two scripts, my label branching may not match up. I just included the extra code as an example of what I\'ve done. It\'s commented and you should be able to use it yourself with modifications).
Also note that the ini.exe and unique.exe are old DOS utilities that I had laying around and put to use for the task. INI.exe edits strings in INI files based on their titles. Unique.exe generates a unique number that I append onto the end of my \"PCBoot\" string. They are needed only for a network load. Since I am not a subscriber to this group, I cannot post attachments. If you require the files, post a reply to this message and I\'ll email them to you.
@echo off
path a:;a:net
rem ***********************************************
rem *** Test for new FDISK
rem ***********************************************
:newdisk
cls
if exist FORMAT.TXT goto :format
if not exist FORMAT.TXT goto :fdisk
rem ***********************************************
rem *** Auto FDISK, change config.sys and Reboot
rem ***********************************************
:fdisk
echo This system will reboot when complete
echo.
echo Deleting all current partitions ...
fdisk /clear >nul
echo Creating new partitions ...
rem fdisk /auto >nul
fdisk /prio:2000 1
echo. >A:format.txt
copy a:config.cd config.sys >nul
fdisk /reboot
rem ***********************************************
rem *** Auto Format and restore config.sys
rem ***********************************************
:format
echo Formatting Drive ...
format c: /autotest /v:home
del a:format.txt
copy config.cln config.sys >nul
echo Finished FDISK and Format
MSCDEX.EXE /D:oemcd001 /L:E
lh smartdrv
(NOTE: AT THIS POINT YOU CAN START AN INSTALL FROM THE CD OR CONTINUE WITH A NETWORK INSTALL)
goto :findnic
rem ***********************************************
rem *** Find 3Com NIC
rem ***********************************************
:findnic
a:net3link-id.exe > nul:
if errorlevel 97 goto 90x
if errorlevel 96 goto 90x
if errorlevel 95 goto 90x
if errorlevel 94 goto 90x
if errorlevel 93 goto 90x
if errorlevel 92 goto 90x
if errorlevel 91 goto 90x
if errorlevel 90 goto 90x
if errorlevel 34 goto 5x9
if errorlevel 27 goto 5x9
if errorlevel 26 goto 5x9
if errorlevel 25 goto 5x9
if errorlevel 24 goto 5x9
if errorlevel 13 goto 5x9
if errorlevel 12 goto 5x9
if errorlevel 11 goto 5x9
if errorlevel 10 goto 5x9
goto nic_error
rem ***********************************************
rem *** Copy Config Files for Network Client
rem ***********************************************
:5x9
a:netini.exe a:netsystem.ini \"network drivers\" \"netcard\" \"elnk3.dos\" > nul:
a:netini.exe a:netprotocol.ini \"network.setup\" \"netcard\" \"ms$elnk3,1,MS$ELNK3,1\" > nul:
a:netini.exe a:netprotocol.ini \"network.setup\" \"lana0\" \"ms$elnk3,1,ms$netbuei\" > nul:
a:netini.exe a:netprotocol.ini \"network.setup\" \"lana1\" \"ms$elnk3,1,ms$ndishlp\" > nul:
a:netini.exe a:netprotocol.ini \"MS$NDISHLP\" \"BINDINGS\" \"ms$elnk3\" > nul:
a:netini.exe a:netprotocol.ini \"ms$netbuei\" \"BINDINGS\" \"ms$elnk3\" > nul:
goto network
:90x
a:netini.exe a:netsystem.ini \"network drivers\" \"netcard\" \"el90x.dos\" > nul:
a:netini.exe a:netprotocol.ini \"network.setup\" \"netcard\" \"ms$el90x,1,MS$EL90x,1\" > nul:
a:netini.exe a:netprotocol.ini \"network.setup\" \"lana0\" \"ms$el90x,1,ms$netbuei\" > nul:
a:netini.exe a:netprotocol.ini \"network.setup\" \"lana1\" \"ms$el90x,1,ms$ndishlp\" > nul:
a:netini.exe a:netprotocol.ini \"MS$NDISHLP\" \"BINDINGS\" \"ms$el90x\" > nul:
a:netini.exe a:netprotocol.ini \"ms$netbuei\" \"BINDINGS\" \"ms$el90x\" > nul:
goto network
rem ***********************************************
rem *** Start Network and network download
rem ***********************************************
:network
a:netini.exe a:netsystem.ini \"network\" \"ComputerName\" nul > nul:
REM **BEGIN RANDOM COMPUTER NAME GENERATOR**
a:netunique.exe /f:a:netname.txt /s:ComputerName=PCBoot$
type a:netname.txt>>a:netsystem.ini
REM **END COMPUTER NAME GENERATOR*
a:netnet start
net use p: (Server sharepoint)
call p:netload.bat
:end