Tuesday, October 25, 2011

Create Bootable USB to install Windows 7 or 8

There are many tools available on internet that help create a bootable USB/Flash drive to install Windows 7. But if you are running Windows 7 we can use built-in tools like diskpart to create a bootable USB drive without any third party tools.

All you need for this is a Windows 7 or 2008 R2 machine, a USB Flash drive with minimum of 4 GB capacity (Note that all data on this drive will be erased), Windows DVD and privilege to run command prompt in elevated mode.

Note:This post assumes you have only one physical hard disk on your machine and no other USB disks attached

First attach a USB flash drive to your system and if auto run kicks in close all related windows.

Fire up an elevated command prompt, invoke diskpart by typing diskpart at the command prompt and key in below commands one by one

list disk
select disk 1
clean
create partition primary
list partition
select partition 1
active
format quick
assign letter=m
exit
This finishes the USB disk preparation. Now key in the below command to copy the installation files of Windows 7/8/2008/2008R2/Server 8  to the above USB disk. Replace X: in below command with path to Windows installation files on hard drive or DVD drive on your machine

xcopy X:\*.* /s/e/f M:\

When the last command finishes, a bootable USB disk with Windows installation files is ready
01-CreateBootableUSBDisk

You can even create a batch file and automate the process without typing commands one by one. For this just create two files one a batch file with .bat extension and a text file with .txt extension. In my case I have created USBBoot.bat and USBBoot.txt on my E drive

Copy and paste below text to batch file (USBBoot.bat) and save (Note: Replace X: with the path where both the files are kept)

@echo off
DISKPART /s
X:\USBBoot.txt
xcopy H:\*.* /s/e/f M:\
pause
exit


Copy and paste below text to .txt file (USBBoot.txt) and save

SELECT DISK 1
CLEAN
CREATE PARTITION PRIMARY
SELECT PARTITION 1
ACTIVE
FORMAT QUICK
ASSIGN LETTER=M
EXIT



Place both the above files in the same location and now launch the batch file from the elevated command prompt and sit back for the command to complete.

As you can see this process requires no third party tools or utilities and can be used on any Windows 7 and above machines.

Reference
Click here to learn more about diskpart
Click here for diskpart technet page

2 comments:

  1. I am very impressed with the article I have just read,so nice.......
    Bishop Lyons Entertainment

    ReplyDelete
  2. Some of these infections can be to a great degree crushing and difficult to evacuate. Some can insert themselves so far in your Koo laid, that it doesn't make a difference how much nectar you put in it, it aint going to work. https://how-to-remove.org/malware/browser-hijacker-removal/picasti-extension-removal/

    ReplyDelete

Share what you feel