If you prefer to do this without an unattended install, and simply do a normal installation, you can do so like this without needing any special knowledge:
1) Copy the text in the box below to a text file. You can name that file anything you want, I use the name
Partitioning.txt in my example below. This text file will serve as a script for
diskpart to automatically partition the drive.
Code:
REM Last Updated on July 3, 2025
REM This script is intended for modern UEFI systems, not systems with Legacy BIOS.
REM Remove all partitions from disk 0 by performing a CLEAN, then initialize
REM the drive as GPT.
select disk 0
clean
convert gpt
REM Create an EFI partition. Note, the EFI partition only needs to be 100 MB
REM in size, but I always use 260 MB because on an advanced 4k format drive
REM the minimum size for a FAT32 partition is 260 MB. By using 260 MB we
REM guarantee this to work on all drives.
create partition efi size=260
format fs=fat32 quick
REM Create an MSR partition. Note that MSR partitions are not formatted.
create partition msr size=128
REM Create a partition for Windows using all remaining space on the disk.
REM After creating it, shrink it by 2 GB. This will give us 2 GB of free
REM space to create a Recovery Tools partition. Note that 2GB is larger
REM than the typical size. Try changing the "2048" below to "1024" if
REM you would prefer a 1GB option to save space.
create partition primary
shrink desired=2048
format fs=ntfs quick label="Windows"
REM Create the Recovery Tools partition. We don't specify a size because we
REM will allow it to occupy all remaining space on the drive (2 GB obtained
REM from shrinking the Windows partition using the "shrink" command above).
create partition primary
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
format fs=ntfs quick
2) Drop this file onto the root of your Windows installation media. If you use a dual partition installation media (a small FAT32 partition and a larger NTFS partition) you can drop the file onto either partition.
3) Start you Windows installation as usual by booting from the installation media.
4) When you reach the first static screen, press SHIFT + F10 to open a command prompt.
5) Now you need to figure out what drive letter your Windows install media has. From the command prompt, issue these 2 commands:
C:
dir
If you get an error after typing C: and pressing ENTER, move on to D:, then E:, etc. Likewise, if you run the
dir command and do not see the file
Partitioning.txt, then move on to the next drive letter. You want to repeat until you find the drive letter where you see the file named
Partitioning.txt after you issue the
dir command.
Once you find the correct drive letter, make a note of it.
6) You notice that in the script I reference disk 0. The disk to which you want to install Windows in NOT always disk 0! We want to determine the correct disk ID because running the script will wipe out and repartition the drive we specify, and you do not want to erase the wrong drive!
From that command prompt, run
diskpart
. Once diskpart has started run the command
list disk
. Hopefully, from the size, you can determine which disk you wish to install Windows on.
NOTE: If that is not enough to identify the correct disk, let me know. There are additional steps we can take.
Take note of the
disk ID. If it is anything other than
disk 0, reboot into Windows and change that disk number in the
partitioning.txt file, then boot from your install media again and continue with step 7.
7) Exit from
diskpart by issuing the command
exit. That will drop you back to a standard command prompt.
8) Run these commands:
NOTE: In the below command, replace
E: with the drive letter you determined earlier to be where
Partitioning.txt is located.
diskpart /S E:\Partitioning.txt
exit
The drive specified in the script will be wiped and partitioned and the command prompt will be closed after you run
exit.
9) Simply continue Windows installation as always now. When asked where to install Windows choose the partition that is labeled "Windows". Continue installation to completion.
I hope that this helps! If you have any questions, you know where to find me
