The motherboard on my old computer system died on Friday. I spent a lot of money buying parts for a new system, then I spent today building it out. I got stuck when it came time to install a new Windows 7 Professional 64-bit operating system. I know that I wanted this system to use the new standard. (I eventually want to install other non-Microsoft operating systems to try out.)
1) I created a text file on an existing hard drive with the commands listed in step 4.
2) I interrupted the BIOS autoselection of boot dvd drive in order to manually select the UEFI dvd drive. It's a duplicate of the standard drive, but it had the "UEFI" prefix on it. Unlike the standard boot image, this one is actually able to create a UEFI windows install. Nothing in the Microsoft boot text would tell you otherwise. I eventually discovered this difference by googling.
3) I started the Microsoft install process. When I got to the point where I needed to select the partition to install, I pressed Shift-F10 to get to a DOS prompt. I ran this command (where the "i:" drive letter would be whichever drive letter happens to be mapped on your system):
diskpart /s i:\winsetup.txt4) Here is the script contained in that "winsetup.txt" file. My new hard drive was disk zero, so the script worked for me. You have to create your own file. Don't run this script on your pc unless you're sure the disk number and partition sizes are appropriate for you. I made partition #2 larger than 100MB because I intend to install several other operating systems and figured it would need the space for setup information for each of them.
rem http://technet.microsoft.com/en-us/libraHopefully somebody else will find this blog post on a web search, and save themselves many hours of scratching their heads.
rem == These commands are used with DiskPart to
rem create five partitions rem for a UEFI/GPT-based PC. ==
select disk 0
rem == 1. Windows RE tools partition ===============
create partition primary size=300
format quick fs=ntfs label="Windows RE Tools"
gpt attributes=0x80000 0000 0000 001
rem == 2. System partition =========================
create partition efi size=1024
rem ** NOTE: For Advanced Format 4Kn drives,
rem change this value to size = 260 **
format quick fs=fat32 label="EFI System"
rem == 3. Microsoft Reserved (MSR) partition =======
create partition msr size=128
rem == 4. Windows partition ========================
rem == a. Create the Windows partition ==========
create partition primary size=257000
rem == b. Create space for the recovery image ===
rem ** NOTE: Update this size to match the size
rem of the recovery image **
rem == c. Prepare the Windows partition =========
format quick fs=ntfs label="Win7"
rem === 5. Recovery image partition ================
create partition primary size=15000
format quick fs=ntfs label="Recovery image"