none
Running Diskpart in task sequence - MDT 2012 RRS feed

  • Question

  • Hello,

    I am looking to merge two partitions using diskpart during my task sequence for upgrading Windows XP machines to Windows 7 (Refresh).

    I have created a diskpart.txt file which resides in scripts directory of MDT deployment share. The diskpart.txt looks like this:

    SELECT DISK 0

    SELECT PARTITION 1

    DELETE PARTITION

    EXIT

    Then I am calling the diskpart in task sequence right before the "Format and partition disk" step. The command line argument for the diskpart task is:

    diskpart.exe /s "%scriptroot%\diskpart.txt"

    But when my task sequence ends, I still end up with C: drive and D: drive. I do not see any errors. Nothing in the logs that shows me any errors.

    The "Format and partition disk" is set to use 100% of space to create the primary partition.

    Thanks,


    SinghP80


    Thursday, October 17, 2013 12:33 PM

All replies

  • Disks are Zero Based, Partitions are One Based.

    You are deleting the 1st partition of the 1st disk, which I assume in your case is C:

    Instead, what you are most likely trying to do is:

    Select Disk 0

    Select Partition 2

    Delete Partition

    Exit

    That will allow the first partition (Partition 1) to expand into the free space left by Partition 2.


    Keith Garner - keithga.wordpress.com

    Friday, October 18, 2013 1:46 AM
    Moderator