CREATING  A  BOOTABLE Windows 7 / 8 USB FLASH DRIVE  IN WINDOWS Vista/ 7/ 8



1- Install/Insert your USB Flash Drive/ Pen drive into your PC (it has to be atleast 4Gb in size)
2- Open Command Prompt as an Administrator.


NOTE: You can read more about opening Command Prompt as an Administrator in Windows Vista / 7 and 8 from this link "How to Open Command Prompt as an Administrator in Windows "

3- On Command Prompt window, enter "diskpart" and hit ENTER.


>>>RESULT.


4- Type "list disk" and hit ENTER.

>>>RESULT.


Take a look and identify the number of your flash drive.
In my case, the number is 2 (Disk 2), NB: Its an 8Gb USB Flash Drive (Size 7385Mb).
5- Type "select disk 2" and hit ENTER

>>>RESULT.


6- Then wipe it by typing "clean" and hitting ENTER.

>>>RESULT.


At this point we want to prepare the USB drive for the files and 
make sure it is bootable.
7- Type "create partition primary" and hit ENTER.

>>>RESULT.


8- Type "select partition 1" and hit ENTER.

>>>RESULT.


9- Type "active" and hit ENTER.

>>>RESULT.


10-Then type "format fs=fat32" and hit ENTER.


NOTE:If you choose to use ntfs, you'll later have to run 
the "Bootsect.exe /nt60 G:" command to put boot manager 
compatible files onto your USB flash drive to make it a 
bootable device). BUT I ADVISE YOU TO USE fat32.

NOTE:This step will take a while. Don't get exited..!!!. Just wait
untill its 100% done.

>>>RESULT. (for fat32 case.)


11-When the above procedure completes, assign a new drive letter to 
the USB Flash Drive by typing "assign" and hitting ENTER.

>>>RESULT.


NOTE: An AutoPlay window (of your pen drive)will appear (in case of Windows Vista and 7)


     OR 

     your USB Flash Drive will open directly in a new window explorer. (in case of Windows 8)


12-Type "exit" to exit from DISKPART session.


>>>RESULT.


13-Type "exit" to close command prompt.


14-Now you can navigate to Windows installation files in your computer 
   or CD/DVD, then copy and paste them in your USB Flash Drive.
   If your Windows installation files are in form of .ISO image, simply
   extract the files into your USB Flash Drive.
   
15-DONE. You can now use your Bootable USB Flash Drive to install Windows.