none
Formatting only C drive using format and partition disk task sequence

    Question

  • I have a machine with two drive C and D with windows XP and planning to install windows 7 in C: drive.

    I dont want to format the holde hard disk, only C: drive and install OS.

    Please let me know how it can be done.


    Regards, Shishir Kushawaha "If this thread answered your question, please click on "Mark as Answer"

    Thursday, April 4, 2013 4:43 AM

Answers

  • Hi,


    Disable the format and partition steps in your task sequence. Add a new 'run command line' above or under this step, with the following command:

    DISKPART /S "%DEPLOYROOT%\CustomScripts\wipe-c.txt"


    In the wipe-c.txt put the following lines:

    select disk 0
    select partition 1
    format fs=ntfs label="SYSTEM" quick
    assign letter=C
    active
    exit

    This would do the trick, also I can imagine there are more ways that lead to Rome! Good luck!


    If this post is helpful please click "Mark for answer", thanks! Kind regards


    Thursday, April 4, 2013 12:07 PM
  • If you use a default task sequence and start the task sequence from within Windows XP, then Windows 7 will install on the C drive and leave the D drive intact.

    However when you are planning on starting the task sequence to install Windows 7 from within Windows PE, then you will need to use Rens's suggestion and use something like a custom diskpart script.

    Kind regards,

    Stephan Schwarz


    If one of these posts answered your question or issue, please click on "Mark as answer".

    My Blog | Twitter: @Schwarz_Stephan | MCTS, MCITP, MCSA, MCSE (Charter Member), MCC-2011.
    How to configure Windows RE/OEM Recovery Partition with MDT
    How to configure Windows RE/OEM Recovery Partition with MDT 2012 Update 1

    Friday, April 5, 2013 9:51 PM

All replies

  • Hi,


    Disable the format and partition steps in your task sequence. Add a new 'run command line' above or under this step, with the following command:

    DISKPART /S "%DEPLOYROOT%\CustomScripts\wipe-c.txt"


    In the wipe-c.txt put the following lines:

    select disk 0
    select partition 1
    format fs=ntfs label="SYSTEM" quick
    assign letter=C
    active
    exit

    This would do the trick, also I can imagine there are more ways that lead to Rome! Good luck!


    If this post is helpful please click "Mark for answer", thanks! Kind regards


    Thursday, April 4, 2013 12:07 PM
  • forgot to set my mail alert :)

    If this post is helpful please click "Mark for answer", thanks! Kind regards

    Thursday, April 4, 2013 2:30 PM
  • If you use a default task sequence and start the task sequence from within Windows XP, then Windows 7 will install on the C drive and leave the D drive intact.

    However when you are planning on starting the task sequence to install Windows 7 from within Windows PE, then you will need to use Rens's suggestion and use something like a custom diskpart script.

    Kind regards,

    Stephan Schwarz


    If one of these posts answered your question or issue, please click on "Mark as answer".

    My Blog | Twitter: @Schwarz_Stephan | MCTS, MCITP, MCSA, MCSE (Charter Member), MCC-2011.
    How to configure Windows RE/OEM Recovery Partition with MDT
    How to configure Windows RE/OEM Recovery Partition with MDT 2012 Update 1

    Friday, April 5, 2013 9:51 PM
  • Furthermore when the task sequence are running LTI Deployment over the machine in the "Move and Data Settings" step you can select "Do not move user_data and settings" and "Keep existing partitions (do not format or partition). 
    Thursday, May 15, 2014 10:48 PM
  • Hi,


    Disable the format and partition steps in your task sequence. Add a new 'run command line' above or under this step, with the following command:

    DISKPART /S "%DEPLOYROOT%\CustomScripts\wipe-c.txt"


    In the wipe-c.txt put the following lines:

    select disk 0
    select partition 1
    format fs=ntfs label="SYSTEM" quick
    assign letter=C
    active
    exit

    This would do the trick, also I can imagine there are more ways that lead to Rome! Good luck!


    If this post is helpful please click "Mark for answer", thanks! Kind regards


    I think the script has bug.The target partition not always partition 1 of disk 0,use Property OSDisk from mdt script better.
    Tuesday, May 20, 2014 1:54 AM
  • Hello Rens,

    I am also experiencing the same issue and very new to MDT.

    Please let me know the physical path, where we have to create wipe-c.txt ?

    I have created it in C:\ and from the options of the task sequence step added the location as File properties.

    Please let me know if I am doing it correctly ?

    Thanks & Regards

    Manu

    Tuesday, August 12, 2014 12:27 PM
  • Please create it on DeploymentShare\Script\yourcriptname.txt
    Past below script in "yourscriptname.txt"

    select disk 0
    select partition 1
    format fs=ntfs label="SYSTEM" quick
    assign letter=C
    active
    exit

    Friday, September 15, 2017 6:56 AM
  • Could you guide me about how to use property OSDisk  from mdt script better ?

    Friday, September 15, 2017 6:58 AM
  • Error custom format drive

    I tried follow your instruction, but it was an error as my screenshot 

    • Edited by kunvu Friday, September 15, 2017 10:26 AM
    Friday, September 15, 2017 10:25 AM
  • Hi

    I am using your recommendation but once the OS is applied on machine, after first reboot it is showing Install Operating system.

    I have disabled both steps (Format and Partition Disk(BIOS), Format and Partition Disk (UEFI)) in MDT task sequence.

    Please help.


    Sourabh Kanoongo

    Wednesday, May 2, 2018 10:43 AM
  • Hi,

    <g class="gr_ gr_42 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" data-gr-id="42" id="42">is</g> this still works for Windows 10? 

    Friday, November 9, 2018 10:27 AM