Skip to content

Instantly share code, notes, and snippets.

@rohan-molloy
Created April 30, 2022 04:59
Show Gist options
  • Save rohan-molloy/17b602bd6ad916c858d4b9c5be5baa00 to your computer and use it in GitHub Desktop.
Save rohan-molloy/17b602bd6ad916c858d4b9c5be5baa00 to your computer and use it in GitHub Desktop.
Install windows from the command line

Installing Windows via command line

  • Step 1: Boot from the ISO and press shift 10

  • Step 2: Run diskpart

select disk 0
clean
convert gpt
create partition efi size=100
format quick fs=fat32 label=system
create parition msr size=16
create partition primary
format quick fs=ntfs label="Windows"
assign letter="C"
exit
  • Step 3: Inspect the install.wim image with dism /Get-WimInfo /WimFile:D:\Sources\install.wim

  • Step 4: Apply the image with dism /apply-image /ImageFile:D:\Sources\install.wim /index:2 /applydir:C:\

  • Step 5: Set up the bootloader C:\Windows\system32\bcdboot C:\Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment