New
#1
Customised diskpart - search and partition SSD
Hello everyone,
I am doing new images for our company, and using WinPe to automate things.
Usually and most of the PC that we deploy have only one disk, and than the default microsoft script does good job for me:
But the issue is when PC has one HDD and one SSD, and than usually SSD is disk1 not disk0. So I was wondering if anyone can help me to modify this script to automatically search for SSD and to partition SSD instead of HDD.Code:rem == CreatePartitions-UEFI.txt == rem == These commands are used with DiskPart to rem create four partitions rem for a UEFI/GPT-based PC. rem Adjust the partition sizes to fill the drive rem as necessary. == select disk 0 clean convert gpt rem == 1. System partition ========================= create partition efi size=100 rem ** NOTE: For Advanced Format 4Kn drives, rem change this value to size = 260 ** format quick fs=fat32 label="System" assign letter="S" rem == 2. Microsoft Reserved (MSR) partition ======= create partition msr size=16 rem == 3. Windows partition ======================== rem == a. Create the Windows partition ========== create partition primary rem == b. Create space for the recovery tools === rem ** Update this size to match the size of rem the recovery tools (winre.wim) rem plus some free space. shrink minimum=500 rem == c. Prepare the Windows partition ========= format quick fs=ntfs label="Windows" assign letter="W" rem === 4. Recovery partition ====================== create partition primary format quick fs=ntfs label="Recovery" assign letter="R" set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac" gpt attributes=0x8000000000000001 list volume exit
Thanks in advance
Windwos Pro 2004