Jump to content

Create 1 Partition and Format

Recommended Posts


I am not sure this is the place to post this. I want to be able to have SmartDeploy run Diskpart and wipe out any factory data and partitions. I would like to have the wipwe and load function run after that so it fills the whole partition with boot and system. Using recreate only fills the partition with the size of the VM.

Any thoughts or help would be appreciated.


Link to comment
Share on other sites

I ran diskpart from Shift F10 and got the pc to do what I wanted. Reading different sites it is recommended to create a command called diskpart.cmd that actually calls a txt file that has all your steps that would normally do manually.

I tried to get it to run by adding a preimage task to call the diskpart.cmd. Tried it at the winpe folder and the Ethernet folder.


Link to comment
Share on other sites

I figured it out after a long weekend.

What I wanted to happen was a preimage task to wipe out all the factory partitions then apply image. I created a batch file called Diskclear.bat. In it I called a txt file called disk_wipe.txt Diskclear.bat had the following "diskpart /s X:\Windows\System32\disk_wipe.txt"

disk_wipe.txt had the following.

Select disk 0


Create partition primary size=200

sect partition 1


format fs=ntfs quick

create partition primary

format fs=ntfs quick


When this runs it gives me the reserved needed and the rest of the disk is 1 partition.

As you can see I called the "X" drive. I opened my existing " boot wims" with imagex part of the Windows AIK tools. I was able to mount the boot wims and copy disclear.bat and disk_wipe.txt in the system32 folder. I was also able to add a preimage task to the Smart Deploy XML file " cmd.exe /C X:\Windows\System32\diskclear.bat /s X:\Windows\System32\disk_wipe.txt

Unmounted and commited the changes. I then replaced the wim on my WDS and was good to go. As soon as I stepped through the Smart Deploy Splash screen the preimage task kicked in created partitions and formatted.

Hope this helps

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...