Open a new command line window by pressing WIN+R and typing in cmd.
Enter the following commands, pressing return after each command.
Opens Windows' integrated disk management tool.
- list disk
Lists all storage devices that are currently attached to the computer.
- select disk X
Replace X with the number of your flashdrive.
- list disk
Check if you selected the correct disk with the last command.
Erases all data on the flashdrive. If your computer is still online, chances are good that you selected the right disk in the last steps. If not, better luck next time.
- create partition primary
Creates a new primary partition on the flashdrive.
- select partition 1
Selects the recently created partition on the flashdrive.
Marks the partition active which is required to be able to boot from it.
- format fs=fat32 quick
Formats the flashdrive with the FAT32 filesystem. Make sure you use FAT32 since NTFS isn't supported by most platforms.
Assigns a drive letter for the flashdrive.
Now that we've successfully created our bootable flashdrive, let's copy the setup files to it. Grab your Windows Vista/7 image and either load the physical DVD or your ISO-Image. I prefer SlySoft's Virtual Clone Drive to load ISO-Images. However, you could of course use your favorite tool to do that.
To copy the files to your flashdrive, modify and run the following command:
- xcopy X:\*.* /s/e/f Y:\
Alternatively, you could also extract the ISO-Image using WinRAR, 7-Zip or any other extraction tool and copy the files with Windows' GUI.
That's it! Plug your USB flashdrive into your computer, boot from it and follow Windows' setup procedure.
You might need to modify your BIOS' boot list to be able to boot from the flashdrive. Please see your Mainboard's manual for more information on this.