By Ivy / Last update October 20, 2022

Content of this article:

Need to install Windows 10 from Command Prompt

Windows 7 has reaches its end of life January 14, 2020, thus it's urgent for users to upgrade to Windows 10 . Because Microsoft will not provide any technical support and the Microsoft customer service, Related services and device will be disconnected in the near future by 2023 at the latest. 

Microsoft users are given many ways to perform a system upgrade, but 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.

Stepwise guide 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.

Before you try any method below, please make some preparations in advance.

  • Download Windows 10 MediaCreationTool from Microsoft to create a system image.
  • Mounted the ISO image and assign a drive letter for it, here take G: as an example. You can navigate to the ISO image file, then right click it and choose Mount from the drop-down menu. 

Tip: If you want to install Windows 11, you can download the Windows 11 ISO or MediaCreationTool from this page.

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

* The clean command marks all the data on the drive as deleted and it will become invisible. Please be sure you want to do this! 
* Remember to 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. They are just an example here.


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

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

  • G:

  • cd boot

  • bootsect /nt60 X:

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

*Replace G with the drive letter of your mount drive as it appears in File Explorer. It contains the Windows 10 ISO image file. 
*Replace X with the correct drive letters for USB flash drive.

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

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

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

Note: 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.

Best time to backup your system for protection 

After installing Windows10 from Command Prompt, your computer is a completely fresh version. It only has the operating system and boot partition(s) or system files required to start Windows. If you create a system image for it right now, it's totally a factory image that can help you repair your computer at any time.

Also, if you don't want to reinstall programs or lose your files in the event of a disaster, you can choose to install all the programs you will use in the near future first and sync files you want to protect to the fresh version of computer, then backup all of them together.

To make it, you need a Windows 10 backup utility. Many users choose to use the built-in tool in the beginning, but later they are disappointed to find that Windows Backup keeps failing. Thus, it's suggested to use a third-party free backup software like AOMEI Backupper Standard.

✦ It enables you to backup system to internal/external hard drives, cloud drives, NAS devices and network with ease.
✦ It has more advanced features such as schedule automatic backup based on daily, weekly and monthly. The scheduled backup will be performed as incremental backup by default to backup changed data only.
✦ Windows 11/10/8.1/8/7/Vista/XP are supported.

Download this freeware now and follow the steps below to backup your system.

Download Freeware Win 11/10/8.1/8/7/XP
Secure Download

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. Click Schedule to enable daily incremental backup (the default option), or change it as per your needs. 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 restore Windows 10 system image to new hard drive or other locations.
◈ Create Portable Version: if you want to perform system backup on multiple computers, you can create a portable version of AOMEI Backupper on removable device, and connect it to any target computer for direct use. This feature is available in Tech and Tech Plus edition.


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. 

After a fresh install, it's the best time to create a factory image and you can set a scheduled backup task to track changes you made later. After that, you can use this freeware to backup files, partition, or entire disk for data protection. As a professional disk clone software, it also has the ability to clone disk to larger disk, clone larger HDD to smaller SSD, clone only OS, etc.