To open Command Prompt while installing Windows 10 or Windows 11, press Shift + F10 at almost any Setup screen, including the language screen and the out-of-box setup screens. On many laptops, press Shift + Fn + F10. A Command Prompt window opens with administrator rights. It is handy for preparing disks, checking drive letters, loading storage drivers, copying files off a failing system, or troubleshooting an installation that will not continue.

Method 1: Shift + F10 During Setup
- Boot from your Windows installation USB or DVD.
- At any Setup screen, such as the language selection or "Where do you want to install Windows?", press Shift + F10.
- If nothing happens, try Shift + Fn + F10, or click on the Setup window first so it has focus.
The same shortcut works during the first-time setup screens (OOBE) after Windows installs.
How do I close it?
Type exit or close the window. Setup continues where you left off.
Method 2: Repair Your Computer
- On the first Setup screen, click Next.
- Click Repair your computer in the lower-left corner.
- Choose Troubleshoot > Command Prompt (on some versions, Troubleshoot > Advanced options > Command Prompt).
Method 3: From an Installed Windows (Advanced Startup)
If Windows is installed but will not start properly, force the recovery environment by interrupting startup three times, or from Windows go to Settings > Recovery > Advanced startup > Restart now. Then choose Troubleshoot > Advanced options > Command Prompt.
Useful Commands in Setup
| Command | What it does |
|---|---|
diskpart |
Opens the disk partitioning tool (list disk, select disk, clean, convert gpt) |
notepad |
Opens Notepad; use File > Open as a simple file browser |
dir C:\ |
Lists files, useful to find which letter is your Windows drive (it may not be C: in Setup) |
drvload E:\driver\file.inf |
Loads a storage or network driver |
robocopy or xcopy |
Copies files to a USB drive before reinstalling |
chkdsk D: /f |
Checks and repairs a drive |
bootrec / bcdboot |
Repairs boot configuration (recovery environment) |
Be careful with diskpart: commands like clean erase the selected disk immediately. Run list disk and select disk carefully, and back up data first.
Can I use PowerShell?
Standard Windows installation media usually does not include PowerShell in Setup. Use Command Prompt.
Example: Prepare a Disk for Installation
- Type
diskpartand press Enter. - Type
list diskto see all disks. - Type
select disk 0(use the correct number). - Type
cleanto erase it (only if you are sure). - Type
convert gptfor modern UEFI systems. - Type
exit, close Command Prompt, and click Refresh in Setup.
When the Setup Command Prompt Acts Up
Shift + F10 does nothing
Try Shift + Fn + F10, use an external USB keyboard, or click the Setup window first. Some managed or customized installation media may disable the shortcut.
My drive letters look different
In Setup, drive letters are often reassigned. Use dir or diskpart > list volume to find the right drive.

Kermit Matthews runs Live2Tech from just outside Philadelphia. He is an IT specialist with over 20 years of experience, from a university help desk to small-business IT, IT management and his own consulting practice, and has written tech guides full time since 2020. Steps are checked against the current software on a real device or the maker’s official documentation. More about Kermit.