Exactly the way we do it here. Diskpart.txt would look like this: select disk=0 clean create partition primary size=<main> assign letter=c create partition primary size=<data> select volume 0 select disk = 0 select partition 2 assign letter=d remove noerr select partition 1 active Sizepart.vbs Const ForReading = 1, ForWriting = 2, ForAppending = 3 Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0 Const OPEN_FILE_FOR_APPENDING = 8 Set fso = CreateObject("Scripting.fileSystemObject") Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_DiskDrive",,48) For Each objItem in colItems HD = int(objItem.Size/1000000000) DATA = 4 MAIN = HD - DATA DATA = ActualSize(DATA*1000) MAIN = ActualSize(MAIN*1000) Exit For next Set f = fso.GetFile("z:\diskpart.txt") Set ts = f.OpenAsTextStream(ForReading, Tristatefalse) t = ts.ReadAll ts.Close t = replace(t, "<main>", MAIN, 1, -1, 1) t = replace(t, "<data>", DATA, 1, -1, 1) Set objOutputFile = fso.OpenTextFile("z:\diskpart.txt", ForWriting) objOutputFile.Write t objOutputFile.Close Function ActualSize(Size) ActualSize=int(Size/1.024) End Function Function TheoreticalSize(Size) TheoreticalSize = int(Size*1.024) End Function STARTNET.CMD would then contain: copy x:\files\diskpart.txt z: > nul cscript x:\files\sizepart.vbs diskpart /s z:\diskpart.txt > nul format c: /FS:NTFS /V:MAIN /q /y > nul format d: /FS:NTFS /V:DATA /q /y > nul You'll have to forgive my code.. I modified it for your scenario. Our situation is a little more complicated since depending on the size of the HD, our 3rd partition can either be 2GB or 40% of the drive.