Hi Or! I solved this problem and for us it works fine. First I wrote a litte vbscript called ZTIRepartition.vbs and copied this to \\server\distribution$\Scripts. Update deployment points and add a Task Sequence on first position which runs a command line: cscript.exe "%SCRIPTROOT%\ZTIRepartition.vbs" with the option "Task Sequence Variable DeploymentType equals REFRESH" Update your OS Package Files on SMS (after you add the file in the program), update DP and run the osd advertisement. That´s all. Script ZTIRepartition: ######################################## Dim WshShell Dim objfs Set WshShell = WScript.CreateObject("WScript.Shell") Set objfs = CreateObject("Scripting.FileSystemObject") Set objshell = CreateObject("WScript.Shell") strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colDiskDrives = objWMIService.ExecQuery ("Select * from Win32_DiskDrive") For each objDiskDrive in colDiskDrives strPartitions = objDiskDrive.Partitions Next strCount = strPartitions If strPartitions = 1 Then WScript.Quit Else Set objAusgabe = objfs.CreateTextFile("C:\Temp\Repartition.txt") objAusgabe.WriteLine "select disk 0" For X = strPartitions To 2 Step -1 objAusgabe.WriteLine "" objAusgabe.WriteLine "select partition " & strCount objAusgabe.WriteLine "delete partition noerr" strCount = strCount - 1 Next objAusgabe.WriteLine "" objAusgabe.WriteLine "exit" cmd = "diskpart.exe /S C:\Temp\Repartition.txt" objshell.Run cmd,0,True End If ######################################## The fact that in the sysprep.inf the varible ExtendOEMPartition in the section [Unattended] is set to 1 makes minisetup use the whole disk.
To repart the disk starting from RIS I use the Winbom.ini in WinPE: [DiskConfig] Disk1 = Disk1.Config [Disk1.Config] WipeDisk = Yes Size1 = * PartitionType1 = Primary FileSystem1 = NTFS QuickFormat1 = Yes SetActive1 = Yes For more partitions:
[DiskConfig] Disk1 = Disk1.Config [Disk1.Config] WipeDisk = Yes Size1 = 25000 PartitionType1 = Primary FileSystem1 = NTFS QuickFormat1 = Yes SetActive1 = Yes Size2 = * PartitionType2 = Primary FileSystem2 = NTFS QuickFormat2 = Yes Hope this helps a little bit! Dietmar |