Requirements:

*USB Flash Drive (Minimum 4GB)
*Windows 7 or Windows 8 installation files.

Follow the below steps to create bootable Windows 7/Windows 8, 
USB drive using which you can install Windows 7 or Windows 8 easily.

Procedure:

1. Plug-in your USB flash drive to USB port and move all the contents
from USB drive to a safe location on your system.

2. Open Command Prompt with admin rights. Use any of the below
methods to open Command Prompt with admin rights.

*Type cmd in Start menu search box and hit Ctrl+ Shift+ Enter.

Or

*Go to Start menu > All programs > Accessories, right click on
Command Prompt and select Run as administrator.

3. You need to know about the USB drive a little bit. Type in the
following commands in the command prompt:

First type DISKPART and hit enter

list disk

Select the USB disk.
select disk X (X is the drive number of the USB flash drive)

List the current partition. Record the partition number.
list partition

Select the current partition and make it active.

select partition Y (Y is the partition number of the USB flash drive)
active

 

Right-click on the Windows 7 iso file and select Extract files. 
Extract the files to a folder (you can name the folder any name you want.

In your command prompt, cd to the windows 7 folder.

cd Desktop/win-7 (Change the destination to the folder that you have extracted)
cd boot
bootsect /nt60 X: (X is the drive letter of your USB drive )

Bootsect infuses boot manager compatible code into your USB key to
make it a bootable device.

IMPORTANT: If you’re currently running 32-bit Windows Vista or 7,
Bootsect will only work if you use the files from the 32-bit Windows 7
install disc. The Bootsect executable from the 64-bit version will not
run in 32-bit Vista.

 

Now, copy all the files from the Windows 7 folder to the USB flash drive.

Reboot the computer. Remember to change the first boot device to your USB drive in the BIOS.

You should be able to install Windows 7 from your USB flash drive now.