Get Command Prompt at Startup in Windows 11
Reach Command Prompt before Windows loads and fix common startup faults.
What Command Prompt Does Before Windows Loads
Command Prompt gives you a direct text link to Windows. It can run before the desktop starts.
This access helps when Windows fails to boot. You can check files, disks, boot data, and system folders.
Many people search for how to get command prompt at startup after a boot loop or black screen. The best route depends on what still works.
Recovery mode uses a small set of tools. Each command can affect system data.
- SFC checks protected Windows files.
- CHKDSK checks a drive for file system errors.
- DiskPart views and manages disks and volumes.
- Bootrec checks parts of the Windows boot setup.
Why Startup Command Prompt Access Matters
Normal Command Prompt runs inside an active Windows session. Recovery Command Prompt runs outside the main system.
That difference matters when damaged files stop Windows from loading. You can work on the offline system instead.
You may also need to copy files before a reset. This can protect work files when Windows will not reach the desktop.
Recovery tools can fix some faults without removing personal files. They cannot repair every hardware problem.
Do not delete volumes without a clear plan. One wrong disk command can make recovery harder.
| Tool | Main use |
|---|---|
| SFC | Checks and repairs protected system files |
| CHKDSK | Checks a drive for file system faults |
| DiskPart | Views and manages disks and volumes |
| Bootrec | Checks parts of the Windows boot setup |
Using Advanced Startup Options

Advanced Startup is the easiest route when the desktop or sign-in screen still opens.
Open Settings, then choose System and Recovery.
Find Advanced startup and select Restart now.
Windows will close open apps and show a blue recovery screen. Choose Troubleshoot.
Next, choose Advanced options, then Command Prompt.
You can use a faster route from the sign-in screen. Hold Shift while choosing Power and Restart.
Keep holding Shift until the recovery menu appears. Save your work first.
These are useful startup command prompt access methods for a working Windows 11 system. They need no USB drive.
Boot From Windows Installation Media
Installation media helps when Windows will not start at all. You need another working computer and a blank USB drive.
Create suitable Windows 11 media, then connect it to the failed computer. Start the PC and open its boot menu.
The boot key varies by computer maker. Common choices include F12, F9, Esc, and Delete.
When Windows Setup opens, choose your language and keyboard settings. Do not choose Install now.
Instead, select Repair your computer. Then choose Troubleshoot.
Choose Advanced options, then Command Prompt. Microsoft's Windows Recovery Environment documentation explains this repair path.
Remove the USB after repair. Then test a normal restart.
This method also helps when built-in recovery files are missing. It gives you a separate path into repair tools.
Use the Recovery Partition Without External Media
Most Windows 11 computers include a recovery partition. This hidden space stores repair tools.
If Windows fails during startup, wait for automatic repair. Select Advanced options when it appears.
Next, follow Troubleshoot, Advanced options, and Command Prompt.
This route needs no USB drive. It works only when the recovery files remain available.
Some computers enter recovery after several failed starts. You can also trigger recovery by stopping startup twice.
Turn on the computer, then hold its power button until it shuts down. Repeat once.
Let the next start continue. Use this method with care.
Forced shutdowns can harm open files if repeated too often.
Check Drive Letters and BitLocker First
Recovery mode may assign different letters to your drives. Windows might appear under D: instead of C:.
Run diskpart, then enter list volume. Note each volume's size and file system.
Type exit to leave DiskPart. Then test a likely Windows drive with dir D:\Windows.
Try another letter if that folder does not exist. Avoid changing disk settings while you only need to inspect files.
BitLocker may also ask for a recovery key. This protects the drive from offline access.
Microsoft explains how to find and use a BitLocker recovery key when Windows cannot unlock the drive.
Keep the key ready before you begin repair. Without it, some files may stay locked.
Run Safe Checks From the Recovery Shell
Start with checks that read data or repair known system faults. Save more forceful commands for clear cases.
To check protected files, use sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows. Replace D with the correct drive letter.
For drive errors, use chkdsk D: /f. This can take a long time on large drives.
To inspect boot records, use bootrec /scanos. Review its result before trying repair commands.
Network features may not work in this shell. Do not assume online tools or shared folders will load.
- Write down each command before running it.
- Check the drive letter twice.
- Wait for each scan to finish.
- Restart after one repair step.
- Stop if the drive makes unusual sounds.
How to Run Startup Repair From Command Prompt

You can open the automatic repair tool from the recovery menu. Choose Troubleshoot, then Advanced options, then Startup Repair.
If that tool fails, return to Command Prompt. First, confirm the Windows drive letter with dir.
Then run the safe checks above. They can reveal damaged files or drive faults.
Boot repair commands need care. Their effect depends on the disk layout and Windows setup.
Do not format a drive as a first step. Formatting removes data and may block later recovery.
If repairs fail, copy key files to another drive. Then consider System Restore, a reset, or professional help.
Important Limits and Next Steps
Command Prompt can fix software faults. It cannot repair failing memory, a dead drive, or a damaged mainboard.
Keep a record of error messages and command results. That record helps a repair shop work faster.
If Windows starts again, back up important files at once. Then check for recent driver or update changes.
Use the least risky path first. A careful check often beats a rushed rebuild.
Step-by-step
- 01 Open Advanced Startup
Open Settings, then choose System and Recovery. Select Restart now under Advanced startup.
- 02 Choose Command Prompt
Select Troubleshoot, Advanced options, and Command Prompt. Sign in if Windows asks for your account details.
- 03 Check the Windows drive
Use DiskPart and list volume to find the right drive letter. Test it with dir D:\Windows.
- 04 Run a safe repair check
Run SFC or CHKDSK with the correct drive letter. Wait for each scan to finish.
- 05 Restart and test Windows
Close Command Prompt and restart the computer. Record any error before trying stronger repairs.
Frequently asked questions
- How do I get Command Prompt at startup in Windows 11?
- Open Settings, System, and Recovery. Choose Advanced startup, then Troubleshoot, Advanced options, and Command Prompt.
- Can I access Command Prompt during startup without a USB drive?
- Yes. Use Advanced Startup or the built-in recovery partition. Both options work without external media.
- How do I open Command Prompt in Windows 11 when it will not boot?
- Start from Windows installation media. Choose Repair your computer, Troubleshoot, Advanced options, and Command Prompt.
- Why is my Windows drive shown as D instead of C?
- Recovery mode can assign different drive letters. Use DiskPart and test each drive for the Windows folder.
- Will Command Prompt remove my personal files?
- Opening it does not remove files. Some commands can erase data, so check each command before running it.
- What should I do if BitLocker asks for a recovery key?
- Find the matching BitLocker recovery key before continuing. The encrypted drive may stay locked without it.