Installing Windows via CMD

A guide to installing modern Windows versions entirely through the command line — faster, offline, and free from forced services and telemetry.

This article describes an alternative method for installing modern versions of Windows that is faster, does not require an internet connection, and does not impose any services on you.

The entire process consists of the following stages:

  1. Booting from installation media
  2. Manual disk partitioning
  3. Applying the WIM image
  4. Installing the bootloader
  5. Modifying the registry
  6. First reboot
  7. Launching system deployment
  8. Creating a user
  9. Additional registry work and two more reboots
  10. Installation complete

Stage 1: System Installation

Opening the Command Prompt

Press the key combination Shift+F10 to open CMD during the installation process.

CMD during Windows installation

Disk Partitioning

You need to create two partitions:

  • EFI partition: 512 MB, formatted as FAT32, assigned drive letter W
  • Main partition: all remaining space, NTFS, assigned drive letter C

Diskpart commands:

select disk 0
convert gpt
create partition efi size=512
format quick fs=fat32
assign letter W
create partition primary
format quick
assign letter C

Applying the WIM Image

First, determine the available editions:

dism /get-wiminfo /wimfile:D:\sources\install.wim
WIM editions list

Then apply the image:

dism /apply-image /imagefile:D:\sources\install.wim /index:4 /applydir:C:\

Installing the Bootloader

bcdboot C:\Windows /s W:

Registry Configuration

reg load HKLM\mount_SYSTEM C:\Windows\System32\config\SYSTEM
reg add HKLM\mount_SYSTEM\Setup /v CmdLine /d "cmd.exe" /t REG_SZ /f

Parameters of the reg add command:

  • /v — registry value name
  • /d — data to place in the value
  • /t — data type (REG_SZ for strings, REG_DWORD for numbers)
  • /f — force change without confirmation prompt

Reboot:

wpeutil reboot

Stage 2: First Reboot

After rebooting, the system enters "setup mode" where only CMD is launched.

Setup mode with CMD

System Deployment

oobe\windeploy
windeploy running

Creating a User

net user /add uzver $tr0ng_p@$$
net localgroup Users /add uzver
net localgroup Administrators /add uzver

Disabling OOBE

move wwahost.exe wwahost.exe.bak

Waiting for windeploy to Finish

Waiting for windeploy

Check status:

tasklist | find "windeploy"

Final Registry Configuration

reg query HKLM\SYSTEM\Setup /t REG_DWORD

Set all DWORD values to 0 (except SetupType):

reg add HKLM\System\Setup /v <value> /d 0 /t REG_DWORD /f

Re-set cmd.exe as the installer:

reg add HKLM\System\Setup /v CmdLine /d "cmd.exe"
Registry configuration

Reboot:

shutdown -r -t 0

Stage 3: Second Reboot

After the second reboot, run one more restart:

shutdown -r -t 0

After this, the system boots with the graphical login interface.

Login screenWindows desktop

Screenshots of the Installed System

Installed system screenshot 1Installed system screenshot 2Installed system screenshot 3

Conclusion

This method requires even fewer actions and less time than a normal installation and can be automated through batch files without the need to learn the unattend.xml syntax.

FAQ

What is this article about in one sentence?

This article explains the core idea in practical terms and focuses on what you can apply in real work.

Who is this article for?

It is written for engineers, technical leaders, and curious readers who want a clear, implementation-focused explanation.

What should I read next?

Use the related articles below to continue with closely connected topics and concrete examples.