Tuesday, April 26, 2011

Installing windows7 / windows vista with a pendrive using command line

You need to have a pendrive of size 4gb or more for this . Now you can make pendrive bootable with either a dvd  of the windows OS or .iso file (image file) of the same . If you are using a dvd then insert the dvd into your dvd drive and if you are using a .iso file then mount it into a virtual drive (eg. Virtual Clone Drive) that you use . Insert your pendrive into your computer  . Then you have to follow a list of commands on your command line (administrator mode ) . To open command line in administrator mode Click on Start Menu -> Search cmd -> then right click on cmd and click on Run as Administrator -> a command line console will open in administrator mode . Now you have to execute the following commands (commands to be executed are given in blue ) :-
  1. DISKPART 
  2. LIST DISK  
  3. List of disks mounted will be displayed on the screen . Select the pendrive you have to make bootable among the disks displayed , using command SELECT DISK 1 (say my pendrive is disk 1) .
  4. CLEAN
  5. CREATE PARTITION PRIMARY
  6. SELECT PARTITION 1
  7. ACTIVE
  8. FORMAT FS=NTFS  (This may take few minutes)
  9. ASSIGN
  10. EXIT
  11. Through command prompt traverse to "boot" folder into your dvd or .iso file (in my case its F: drive ) F: and press enter.Then write CD boot and press enter .
  12. Considering your pendrive is H: .Now you have to execute the final command bootsect.exe /NT60 H: 
  13. Now you have to copy all the contents of dvd or .iso file into your pendrive . For that right click on your dvd drive or virtual drive and click "open" .
  14. Now select all the contents and copy it to your pendrive .
  15. Now your pendrive is bootable .
 A screen shot of the above commands is given below(my dvd drive is F: and pendrive is H:):-
USB boot screenshot

To find another easier way to make your pendrive bootable click here .

No comments:

Post a Comment