
Usually, most people install or reinstall Windows operating system from DVD drive. But, since the USB become popular, we have an alternative to boot and install an operating system to a PC from USB flash drive.
Since most of windows installers come in DVD drive format, we have to copy it to a USB flash drive. Before that, I have to make the USB flash bootable. In this post, I will discuss the command prompt method. You can make the Windows 7 USB FLash installation Disk from any Windows computer. In this post, I use Windows 7 (the instruction is the same for Windows XP). Below are the steps:
Step 1: Format USB Flash Drive To NTFS formatIn your Windows, go to
Control panel -> system -> hardware -> Device manager. Under the disk drives section, right click on the USB storage drive and select Properties.

Step 2: Select USB Flash Drive To Be Bootable Disk
On Windows 7 Start Menu, navigate to command prompt entry (Start -> All Programs -> Accessaries) , right-click the Command Prompt and select Run as administrator.

Type "diskpart" & press ENTER. Then type "list disk", ENTER to list all disks attached to this computer.

From the disk list, identify the USB Flash Drive. In my case, Disk 1 (red rectangle) is my USB flash drive. Type "select disk 1" to select the disk (the command is "select disk X" where X is the drive number).
After selecting the disk, list the partition in the selected list by typing "list partition". Select the partition you want to make a bootable Windows 7 installation by typing command "select partition Y", where Y is the partition number of USB flash drive. Then, type "active" to make the selected partition to become an active partition.

You are done in preparing the disk for bootable. Type "exit" and Enter.
Step 3: Creating bootable USB flash drive
Copy the content from the Windows 7 Installation content to your computer desktop into a folder, I named is as win-7 (you can name it according to your preference).
Go into the windows folder, in my case win-7 by typing command "cd Desktop/win-7" (Change the destination to the folder that you have extracted). Then, "cd boot" to go into boot directory.
Type: bootsect /nt60 X: (X is the drive latter of your USB drive)

Then, copy all the files from the Windows 7 folder to the USB flash drive. Now, you should be able to use the USB Flash drive to boot and install Windows 7.
Note: You need to change the first boot device to your USB drive in the BIOS.