By AOMEI / Last Updated March 2, 2021

Need to install Windows 10 from Command Prompt

As Microsoft's Windows 7 gets closer to its 2020 end of life date, more and more Windows 7 users are planning to upgrade to Windows 10. Although Microsoft users are given many ways to perform a system upgrade, these methods usually don't work correctly, and they may bring unwanted files, settings and apps to the new system.

Just to be on the safe side, a clean installation can be your best choice. Additionally, when your computer is having system and other issues, you can quickly resolve them via a system installation, as it will remove everything from the hard drive and start from scratch. Meanwhile users can get rid of viruses and improve battery life.

How to install Windows 10 with Command Prompt?

For many users, system installation involves a complex process. However, Command Prompt makes your operations easier. The following two methods will show you how to use Command Prompt to install Windows 10. Suppose you have downloaded Windows 10 ISO files from Microsoft and mounted the ISO image (navigate to the ISO image file and then right click it to choose Mount).

Method 1. Install Windows 10 directly from the ISO files

Step 1. Press Windows logo key + R at the same time. Type diskpart in the Run box and then click OK.

Step 2. Type list vol and then press Enter to find the partition containing the ISO files.

Step 3. Type G:\ISO_Files\setup.exe and then press Enter (G represents the number of the volume in which the ISO image is stored).

Step 4. The Windows Setup page appears. Make the selections you prefer and then click Next.

Windows Setup

Step 5. Click Install now to continue.

Step 6. If you're installing Windows 10 for the first time, you must enter a genuine product key. If you're reinstalling Windows 10, just click I don't have a product key. Then click Next.

Product Key

Step 7. Select an edition of Windows 10. Then click Next.

Step 8. Tick the I accept the license terms checkbox and then click Next.

Step 9. Select Custom: Install Windows only (Advanced) from the list.


Step 10. You will be asked where you want to install Windows. Choose the drive or partition that you want to use for Windows 10.Then click Next.

Select Drive Or Partition

Step 11. Once the installation is done, you need to restart your computer by clicking Restart now.

Restart Now

Method 2. Install Windows 10 from a bootable USB

Installing Windows 10 with a bootable USB can greatly reduce installation time. To create a bootable USB flash drive with the installation files, you can insert a USB (at least 4GB in size) to your computer and then follow these steps:

Step 1. Press Windows logo key + R at the same time. Type diskpart in the Run box and then click OK.

Step 2. Type the following commands one at a time and press Enter after each command:

  • list disk

  • select disk 1

  • clean

  • create partition primary

  • select partition 1

  • active

  • format fs=ntfs quick (or format fs=fat32 quick)

  • assign letter=X

*Replace 1 with the number of the USB flash drive and change X for any available letter you want to use for your USB flash drive.


Step 3. Type exit and then press Enter to quit the tool.

Step 4. Navigate to the boot folder of the Windows 10 ISO files. To do this, type the commands below one at a time and press Enter after each command:

  • g:

  • cd boot

*Replace g with the letter of your mount drive as it appears in File Explorer.

Step 5. Type these commands and press Enter on each line:

  • bootsect /nt60 X:

  • xcopy G:\*.* X:\ /E /F /H

*Replace the X and G with the correct drive letters for the USB flash drive and Windows 10 ISO image respectively.

Step 6. Once that’s done, you can get a bootable USB flash drive.

Step 7. Plug the bootable USB flash drive into the device you wish to install Windows 10 and boot from it. As soon as you boot, press any key to get into the Windows Setup page.

Step 8. Repeat Step 4 to Step 11 mentioned in Method 1 to install Windows 10.

Tips: The installation process will erase everything on the primary hard drive of your computer. If you have some important files on it, you’d better backup files to an external hard drive in advance.

An easy but efficient way to protect Windows 10

After installing Windows from Command Prompt, you might consider taking some measures to protect your system. System backup is undoubtedly the best choice, as it allows you to restore the system to its last working state whenever you encounter unexpected events.

Although Windows 10 provides users with its built-in backup tool, many people are disappointed to find that Windows Backup keeps failing. Luckily, there is a free backup software – AOMEI Backupper Standard that enables you to backup system to internal/external hard drives, cloud drives, NAS devices and network with ease.

Compared to Windows Backup, this freeware has more advanced features such as automatic system backup based on weekly and monthly, incremental and differential backup and so on. Download this freeware now! Windows 10/8.1/8/7Vista/XP are supported. Now, follow the steps below to backup your system.

Step 1. Install and open this freeware.

Install Now

Step 2. Click System Backup under Backup tab.

System Backup

Step 3. The Task Name can be modified by your needs. The related system partitions are selected by default. Select the destination path (here is F:\) to store the system image.

Select Destination

Step 4. Confirm your operations and then click Start Backup.

Start Backup


  • Options: click it to comment this backup task and enable email notification.

  • Schedule: set the backup task to run automatically. Daily, Weekly and Monthly are supported. To enjoy Event triggers, and USB plug in modes, you need to do an edition upgrade.

  • Scheme: it deletes the older backups automatically. This feature is available in AOMEI Backupper Professional.

  • You can visit Home > the system backup task > Restore to do a system restore.


Two efficient methods are described here to assist you to install Windows 10 from Command Prompt. You can choose one of them based on your own situations. After installing, don’t forget to protect your system by using AOMEI Backupper Standard. What’s more, this freeware owns many other practical features, for instance, backup C drive in Windows 10.