How To Install Windows From USB Drive (Using Command Prompt)

Installing Windows from USB drive (pen drive) might be necessary if users want to install Windows to Net book which does not have a disk drive or in a computer, without an optical drive. But for an USB to work as a bootable device it has to be converted into a bootable flash drive and an image for the Windows operating system has to be loaded on it. This process can be done in generally two ways:

  1. Using Command Prompt.
  2. Using applications like Power ISO.

The Command Prompt procedure is for the advanced users who are comfortable using it or have knowledge about the same. Users who have no prior knowledge or experience about command prompt can also follow this method but should be careful with the commands and the steps given below. If they want a simpler and easier process, they can use the other method by using applications like Power ISO and the method is described here – Using Power ISO.


Formatting the USB Key

Formatting a USB stick will delete any kind of data present in the device. So we should take a backup of any such data. While choosing a pen drive to make it a bootable device, we must keep in mind that the device should have:
1. A comparatively good read/write speed.
2. The capacity should be enough to store the image file on it.
We must also ensure that the computer in which we are manipulating the device should is running at least Windows Vista or any other updated version of Windows. Once we have ensured that, we can go through the following steps:

  • First, we connect the USB stick to the computer, and wait for till it is recognized and also make sure that no other USB devices are connected to the machine peripherals during this process.
    USB recognised image
  • Then we go to Start, click on Accessories, right click on Command Prompt and run as administrator. This can also be done by going to the Windows/System32 folder and then right clicking the executable file cmd.exe and selecting ‘Run as administrator’. Simultaneously, we can also click on Start button and typing cmd and activating the Command Prompt using Ctrl+Shift+Enter.
    Open Command Prompt image         Run cmd image
  • When the command prompt window opens, type DISKPART in the command line. This lets us format and create partition.
    Preparing USB flash drive image
  • Then type LIST DISK to list all the active disc drives connected to the system with corresponding numbers and capacity. We have to keep track of which serial number signifies the USB drive we are using.
  • Then we type SELECT DISK followed by the appropriate disc number from the above step.
  • In the next line we type CLEAN to remove any kind of existing partitions from the USB device.
  • Once the clean successful message is prompted, we type CREATE PARTITION MEMORY to create a new partition memory with default parameters.
  • In the next line we type SELECT PARTITION 1 to focus on the newly created partition.
    Command Lines image
  • Then we type ACTIVE to activate the presently focused partition to let the computer know that it is a valid partition.
  • Once this is done, we type FORMAT FS=NTFS. This formats the disk partition using NTFS file system and might take quite some time depending on the size of the USB drive that we are using.
    Format USB image
  • In the command line, we type ASSIGN to assign a particular drive letter to this USB device and we should also keep a note of the assigned letter.
  • Finally, we type EXIT to exit the DISKPART command utility.

Converting the USB drive to a Bootable Device

The formatting and preparation of the USB stick is complete, and the next procedure would be to convert the USB stick we are using into a bootable device so that the computer can read it and load installation files from it while startup.

  • We insert the Windows CD/DVD with all the installation files into the system and copy all these files into a separate folder which we save locally such as on the desktop. We give an identifiable name to the folder such as Windows 8.
  • Now, we go back to Command prompt and run it as an administrator.
  • We must then use the ‘CD’ command to browse to the folder where the extracted ISO files are present. The command path should be like: “C:\Users\Username\Desktop\Windows 8”. Username in this command should be replaced by the name of the user’s computer.
  • Then we type CD BOOT in the command line which will get us to the boot directory.
  • Then in the next line we type BOOTSECT.EXE/NT60 X, where X is the letter assigned to the USB device previously. The main function of this boot sect command is that it induces a boot manager compatible mode and turns the USB device into a bootable drive.
    bootsect command image

We must also keep in mind that if the computer we are using is running a 32-bit version of the same windows, then it will only accept installation files for the 32-bit version as on the installation CD/DVD and not the 64-bit versions.

Copying Installation Files to the USB Stick

We can copy the extracted ISO files for installation to the USB device using command prompt too. But that would be unnecessary as we can directly drag and drop these files from the “Windows 8” folder which we save on desktop, to the USB device.
For users who still want to use command prompt for the purpose, they can type the following in the same command prompt window that they were using: “XCOPY A:\*.* \X:\”. Here A refers to the disc drive in which we have loaded the Windows CD/DVD and X refers to the USB drive to which we want to copy.
Copying Install files image

Booting Windows

Once our device is ready, we have to plug it in to the computer where we want to load the new operating system using the flash drive. While it is connected we have to switch it on (if machine is switched off) or restart (if machine is switched on) and enter the BIOS by pressing the BIOS key while startup which varies from computer to computer. Once the BIOS has loaded we have to change the boot order by changing the boot device priority and select the USB drive as the first boot preference. Then we save the changes and exit.

Now when the system re-starts it should look for the connected USB drive and might flash a message to press any key to boot from external device. If prompted so, we press any key as otherwise, the system will automatically move to its next booting preference – the hard drive and boot normally. Although for most systems such a message is not prompted and it automatically starts booting from the externally connected flash drive. Windows shall then automatically load and users will have to follow the on-screen instructions to successfully load Windows into the system.