Wednesday, January 07, 2009
Deployment Forum HomeDeployment Forum ArticlesDeployment Forum Download LibraryDeployment Forum Member BlogsDeployment Forum Community Forums
Member Login
StandardLiveID


Register
Forgot Password ?



Guests can view and read messages in the community forums, but you must register and log in to Deployment Forum before you can post messages. Click Register at the top of this page. Before posting messages, please read the forum guidelines at the bottom of this page.

Subject: Repartition in ZTI Refresh
Prev Next
You are not authorized to post a reply.

AuthorMessages
Or TsemahUser is Offline

Posts:53

Send Message
04/29/2008 5:39 AM  

    This have been a long awaited feature by the BDD\MDT Users

How can i do, using BDD\MDT Tools,  a repartition of the hard drive while doing a ZTI Refresh

 

Or.

DietmarUser is Offline

Posts:70

Send Message
07/11/2008 6:27 AM  

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
 

You are not authorized to post a reply.
Forums > Deployment Solutions > Zero Touch > Repartition in ZTI Refresh



ActiveForums 3.7
Forum Policies
Minimize

These forums are a user-supported community for IT professionals to exchange deployment tips, solutions, and techniques. For the benefit of all Deployment Forum members, please observe the following guidelines when posting to these forums:

  • We reserve the right to remove any message. Our moderators will remove all messages that are not respectful or productive. Profanity, racism, prejudice, and flaming are not tolerated.
  • Do not advertise products or services. Our moderators will remove all advertisements or service announcements. Product and service recommendations from active Deployment Forum members are encouraged, however.
  • Make sure your question isn't already answered. Before posting questions, search the forums. After ensuring that your questions are unique, post them to the most appropriate forum. This will help reduce noise in the forums.
  • Help make the most of each thread. Do not post unrelated messages to a thread. Also, if you've resolved a question outside of these forums, please share the solution with other members by posting it back to the thread.
  • Do not share confidential information. Confidential information includes product keys and addresses. Our moderators will edit any message containing confidential information, so double-check messages and their attachments before posting them.
  • Post messages using only the English language. For the benefit of all Deployment Forum members, please post your messages using the English language.

We hope that you enjoy using this community. Please submit your comments and feedback on the Comments and Feedback page or post them to the Comments, Feedback forum.



Privacy Statement  |  Terms Of Use
© 2007 Jerry Honeycutt