What Diskpart Can Do for You and How to Use Windows 7 Diskpart?

Windows 7 Diskpart is a built-in tool that can hep you partition hard drive with command prompt. Here you can learn about Diskpart in Windows 7 deeply.


By Cherry / Updated on May 12, 2023

Share this: instagram reddit

Diskpart in Windows 7

Diskpart Windows 7 is a powerful tool that can solve a lot of problems of your PC’s drives. It allows you to partition, remove partitions, remove formatting, assign and remove drive letter and mount points, convert disks from basic to dynamic, create and extend volumes, etc. Most commands that you can perform in Windows Disk Management are available with Diskpart. Before using Diskpart commands, you must first list, then, select an object to give it focus. When an object has focus, any Diskpart commands that you type will act on that object. If you want to view the commands and parameters of Diskpart tool, you can type help in Diskpart command prompt, it will list all commands and parameters:

Diskpart Help

Well, how to use Windows 7 Diskpart?

How to open Diskpart in Windows 7?

Situation1: If you can boot into Windows 7 system, you can open Diskpart by clicking Start, type cmd at the search box. Then, right click the cmd progress, select Run as Administrator. In the command prompt, type diskpart, press Enter to open it.

If you cannot boot into Windows 7, you can access Diskpart with a Windows 7 installation disc:

1. Insert the disc to your computer and restart your computer, press any key to boot from the installation disc.

2. Select your prefered language, time and keyboard, click Next. It will show you the Windows 7 install interface. Click Repair your computer here.

Windows Install Window

3. select the operating system from the list, and click Next.

4. Select Command Prompt in the following screenshot.

Command Prompt

5. Type diskpart and press Enter.

Situation2: If you do not have Windows 7 installation disc, you can take use of System Recovery Options installed on the hard drive to access Diskpart.

1. Restart the computer. PressF8 as the computer start to boot until the Advanced Boot Options screen display.

2. Select Repair Your Computer here. Press Enter.

Repair Your Computer

3. You will get into the System Recovery Options window, select Command Prompt, type diskpart, press Enter. Then, you can open Windows 7 Diskpart without installation disc.

Then, you can use Diskpart to format partition, create partition, delete partition, etc. Here is an example of how to partition hard drive in Windows preinstallation environment.

Partition hard drive with Diskpart under Windows PE

Many users installed Windows 7 by themselves. When the installer runs to the interface that ask you “where do you want to install Windows?”, you will find that if you partition hard drive here, the partition you created are all primary partition - there is no option for creating logical partition, which will cause the rest space cannot be allocated after creating 4 primary partition.

To get out of this situation, many users only create one primary partition and then install operating system. That means they need to repartition hard drive in Windows 7 with Disk Management or third party software after installing OS, which is tedious. Is there a simpler and easier way to partition hard drive under Windows Preinstallation Environment (Windows PE)?

Fortunately, Windows 7 Diskpart allows you to partition hard drive under WinPE. Thus, you do not need to partition hard drive after installing, and it will not produce a 100MB system reserved partition. Finally, the operation will be effective without rebooting computer.

But how to use Diskpart during Windows 7 installation? When the installer runs to create disk partition interface, press “Shift+F10” to open the command prompt. Type diskpart and press Enter to open Diskpart. Then, you can use the command-line to partition hard drive in WinPE.

Here is a case of how to partition hard drive into one primary partition and three logical partitions with Diskpart under Windows PE.

  • 1. Typelist disk in the command prompt. It will list all disk on your computer. Here is only one disk shown as Disk 0.

  • 2. Type select Disk 0. the Disk 0 will be selected.

  • 3. Type clean. It’s Diskpart clean disk command.

  • 4. Type create partition primary size=512000. You can decide the size as your demand.

  • 5. Typeactive. The new primary partition will be activated.

  • 6. Type format quick. It’s diskpart format quick command that will format the partition you created quickly.

  • 7. Type create partition extended. It will create extended partition with the rest space on the hard drive.

  • 8. Type create partition logical size=512000. it will create the first logical partition on the hard drive.

  • 9. Type format quick.

  • 10. Type create partition logical size=512000.

  • 11. Type format quick.

  • 12. Type create partition logical. It will create logical partition with the left space.

  • 13. Type format quick.

  • 14. Type exit to close Diskpart.

  • 15. Type exit to close command prompt.

After those steps, refresh the window of “where do you want to install Windows?”, you will see the partitions you created with Diskpart. Then, you can select the primary partition to install Windows 7 OS on.

The Free Alternative to Diskpart: AOMEI Partition Assistant

Windows 7 Diskpart does really a powerful hard drive manager. However, there are too much commands and syntax that most users could not use it flexible. Once you type a wrong command, you may suffer a big damage because the command cannot be canceled. To save those people who do not know much about Diskpart in Windows 7, here we introduce you a free alternative to Diskpart - AOMEI Partition Assistant Standard, which can help you partition your hard drive in Windows 7/8/10/11 with concise interface instead of command-line. It allows you to create/move/resize/delete/format/wipe/check/merge partitions, assign/change drive letter, wipe hard drive, convert data disk between MBR and GPT, etc. You can download free, and you can see its concise interface like following picture.

Alternative to Diskpart

AOMEI Partition Assistant also allows you to partition hard drive under Windows PE. Upgrade to AOMEI Partition Assistant Professional, and you can unlock its function Quick Partition, which you can partition hard drive quickly under WinPE. With the advanced edition, you can better manage your hard drive such as partition alignment, allocate free space from one partition to another, convert system disk between MBR and GPT partition styles, convert primary partition to logical partition, and vice versa, convert dynamic disk to basic disk, and many more.

Cherry · Staff Editor
Cherry is an editor of AOMEI Technology, she covers backup & restore, hard disk & partitions management, cloud files transfer, website & database backup and so on for AOMEI. She enjoys helping people find solutions to their problems. She loves traveling, cooking, reading and so on. She takes most of time with her family when she is not working.