Guide created by Andrew Lee
Note that this guide does not go into detail, it's just providing the commands to install Windows.
Be cautions when doing this when dualbooting, please backup any existing data or you will lose them all.
First open CMD by pressing the following keys after booting into setup: Shift + F10
diskpart
list disk
select disk (number for main disk)
clean # Clearing the partitions
convert mbr
-----------------------
(Creating recovery is optional)
create part primary size 500
format quick label Recovery
assign letter R
set id 27
-----------------------
create part primary
format quick label Windows (or label of your choice)
assign letter C (or E)
active
exit
diskpart
list disk
select disk (number for main disk)
clean # Clearing the partitions
convert gpt
create part efi size 512
format fs fat32 quick
assign letter w
create part msr size 16
-----------------------
(Creating recovery is optional)
create part primary size 500
format quick label Recovery
assign letter R
set id de94bba4-06d1-4d40-a16a-bfd50179d6ac
gpt attributes 0x8000000000000001
-----------------------
create part primary
format quick label Windows (or label of your choice)
assign letter C (or E)
exit
[letter of installation disk]:
cd sources
Listing SKUs like Home, Pro, Education, Ultimate, etc.
dism /get-wiminfo /wimfile:[Location to install.wim]
Copies the content from the install.wim file to the main disk.
dism /apply-image /imagefile:[Location to install.wim] /index:[SKU Number] /applydir:(Drive letter to main disk)
e.g dism /apply-image /imagefile:d:\sources\install.wim /index:6 (Win10 Pro) /applydir:C:\
md R:\Recovery
xcopy /h C:\Windows\System32\Recovery\Winre.wim R:\Recovery
C:\Windows\System32\Reagentc /Setreimage /Path R:\Recovery /Target C:\Windows
bootsect /nt60 C: (or E:) /force /mbr
bcdboot (Drive letter to main disk):\Windows
/s [drive letter to UEFI]:
reg load HKLM\SOFT C:\Windows\System32\config\SOFTWARE
reg load HKLM\SYS C:\Windows\System32\config\SYSTEM
reg add HKLM\SOFT\Microsoft\Windows\CurrentVersion\Policies\System /v VerboseStatus /t REG_DWORD /d 1 /f
reg add HKLM\SOFT\Microsoft\Windows\CurrentVersion\Policies\System /v EnableCursorSuppression /t REG_DWORD /d 0 /f
reg add HKLM\SYS\Setup /v CmdLine /t REG_SZ /d cmd.exe /f
wpeutil reboot
oobe\windeploy
Reagentc /enable (if you made a recovery parition)
Reagentc /Info /Target C:\Windows
net user /add (username) (password)
net localgroup users /add (username) # in case Windows didn't add the users group
net localgroup administrators /add (username)
reg add HKLM\SYSTEM\Setup /v OOBEInProgress /t REG_DWORD /d 0 /f
reg add HKLM\SYSTEM\Setup /v SetupType /t REG_DWORD /d 0 /f
reg add HKLM\SYSTEM\Setup /v SystemSetupInProgress /t REG_DWORD /d 0 /f
exit
When entering the desktop open CMD as admin and run the following.
reg add HKLM\SOFT\Microsoft\Windows\CurrentVersion\Policies\System /v VerboseStatus /t REG_DWORD /d 0 /f
reg add HKLM\SOFT\Microsoft\Windows\CurrentVersion\Policies\System /v EnableCursorSuppression /t REG_DWORD /d 1 /f
If there's anything that needs to be added, feel free to tell me in the comments below!
- Caesar (TheDarkBomber#0229): For helping fixing some things in the script that I forgot or needed to add.
This looks like a fun project. If nothing at all, I'll learn what goes on behind the scenes when I install Windows the normal way. Plus, it'll come in handy if you need to fix issues like OS not booting