If Command Prompt is missing from Advanced options, it means the recovery path is not loading the command shell option you expect. The fix depends on whether you can still reach Windows Recovery Environment, Startup Settings, or a Safe Boot command prompt. This guide shows the next step for each path.

What the missing option usually means

What the missing option usually means
Windows search results show Command Prompt with the administrator option

The missing Command Prompt entry usually points to a broken recovery path, not a missing cmd.exe file in normal Windows. The first check is whether WinRE actually opened, because the path is usually Troubleshoot > Advanced options > Command Prompt. If the menu sends you back to the desktop, you are not in the recovery path you think you are.

Windows 10 and Windows 11 can both expose the same recovery route, but the failure mode is often different. Sometimes Advanced options never loads. Sometimes Startup Settings never appears. Sometimes Command Prompt opens and closes because startup commands or command-line settings interfere.

Likely causes

Most often, WinRE fails to load cleanly. Less often, Startup Settings loops back to Windows, Safe Mode with Command Prompt is unavailable, or a startup command shuts cmd.exe down as soon as it starts. Disk corruption and damaged system files can also interfere, but they are not the only possible cause.

Recovery command table

Recovery command table
A Windows command prompt shows file recovery commands and status text

Use this table to match the symptom to the next step. It separates boot-path failure, recovery-environment failure, permission failure, and disk damage so you do not run repair commands blindly.

Symptom Likely cause Next action Exact command or recovery step
Restart goes to desktop WinRE did not load Enter recovery from a working Windows session Shift+Restart, then Troubleshoot > Advanced options
Startup Settings won’t appear Recovery path is broken or looping Use another path that reaches WinRE, then retry Startup Settings Troubleshoot > Advanced options > Startup Settings > Restart
CMD opens then closes Startup command or extension setting interferes Start cmd without AutoRun cmd /d /k
Disk repair needed Storage corruption or file-system errors Run a disk check from elevated Command Prompt chkdsk C: /R /F /X
Safe Mode unavailable Startup Settings never fully loads Use Safe Boot: Alternate Shell to reach a command prompt MSConfig > Boot > Safe boot > Alternate shell
System files fail to load Corrupted Windows files Run file verification after elevation sfc /scannow
Drive status looks bad Hardware or firmware issue on the volume Check health before deeper repair wmic diskdrive get status
Safe Mode with Command Prompt missing Startup Settings never finished loading Use the Safe Boot workaround instead of waiting for the menu MSConfig > Safe boot > Alternate shell

Why Command Prompt disappears from Advanced options

The missing entry is usually a symptom of the recovery environment failing, not a broken command shell in Windows itself. On a healthy system, Advanced options should lead to Command Prompt, Startup Settings, System Restore, and related tools. When the menu vanishes or loops, the failure is often in WinRE or the boot chain that reaches it.

WinRE did not load correctly

  1. From Windows, hold Shift while selecting Restart.
  2. Choose Troubleshoot > Advanced options.
  3. Look for Command Prompt. If it is missing, stop and use another recovery route or the Safe Boot workaround.
  4. Run DISM /Online /Cleanup-Image /ScanHealth, then DISM /Online /Cleanup-Image /RestoreHealth from a working elevated Command Prompt.
  5. After repair, open Troubleshoot > Advanced options again and check whether the option is present.

Picture a Windows 11 laptop that always lands back on the sign-in screen after Restart. That points to a broken recovery path, not a missing admin tool. Repairing Windows from a working session is better than trying to force the wrong menu path.

How do I open Command Prompt from Advanced startup?

Open WinRE through Advanced startup, then select Command Prompt from Troubleshoot > Advanced options. If Windows asks for a recovery account, choose an administrator account and enter the password. This path opens Command Prompt with recovery privileges, which is different from a normal desktop launch.

  1. From Windows, choose Shift+Restart or another recovery route that reaches WinRE.
  2. Select Troubleshoot.
  3. Select Advanced options.
  4. Choose Command Prompt.
  5. If prompted, select an administrator account and enter the password.

In normal Windows, cmd.exe is the command interpreter. It starts a new instance of cmd.exe, and without parameters it shows version and copyright information. It also accepts /c to run a command and exit, and /k to run a command and keep the window open. Those switches matter later when the window closes too fast. (Microsoft Learn)

What should I do if Advanced options restarts to Windows?

If Advanced options sends you back to Windows, the problem is usually in the recovery path itself, not the command prompt tool. That often means Startup Settings did not initialize, the boot path is looping, or WinRE is damaged enough that it cannot finish loading. Try another recovery route that reaches WinRE, then check whether Startup Settings appears. If it does not, use the Safe Boot workaround instead of chasing more recovery menus.

Fix the recovery loop first

  1. Try Shift+Restart again and confirm you reach Troubleshoot > Advanced options.
  2. If you can reach it, run DISM /Online /Cleanup-Image /ScanHealth from a working elevated Command Prompt.
  3. If ScanHealth reports corruption, run DISM /Online /Cleanup-Image /RestoreHealth.
  4. Use DISM /Online /Cleanup-Image /StartComponentCleanup after repair if component cleanup is needed.
  5. Restart and test the Advanced options path again.

Suppose a desktop system keeps returning to the login screen after every recovery attempt. That pattern usually means the recovery layer is failing before the shell tools ever load. Use a working Windows session for the repair steps first, then retry the menu path.

How do I get Safe Mode with command prompt?

Safe Mode with Command Prompt is the startup option that opens a command window after minimal drivers load. It depends on Startup Settings, and that menu appears only after the recovery path reaches Troubleshoot > Advanced options > Startup Settings > Restart. If that path is unavailable, use MSConfig and choose Safe boot with Alternate shell, which is reported by thewindowsclub.com as a way to boot to a command prompt.

Startup Settings path

  1. Open Troubleshoot > Advanced options > Startup Settings.
  2. Select Restart.
  3. When the list appears, press 6 or F6 for Safe Mode with Command Prompt.
  4. Sign in with an administrator account if prompted.
  5. Use the prompt for repair commands and diagnostics.

Safe Mode with Command Prompt is the right choice when the desktop shell is unstable but the boot path still works. If the menu never appears, the Safe boot Alternate shell path can get you to a command prompt without depending on Startup Settings.

What if Startup Settings or Safe Mode won’t load?

If Startup Settings never appears, or option 6/F6 does nothing useful, the recovery environment itself may be damaged. In that case, use another recovery route that reaches WinRE or the Safe Boot Alternate shell route before trying deeper repair commands. If you can reach Windows, open MSConfig and select Safe boot with Alternate shell to boot to a command prompt.

Fallback access checks

  1. Try Shift+Restart from a working Windows sign-in session.
  2. If that fails, use another recovery route that reaches WinRE on your device.
  3. Once inside, check whether Startup Settings appears.
  4. If it does, choose Restart and then press 6 or F6.
  5. If it does not appear, open MSConfig, go to Boot, select Safe boot, and choose Alternate shell.

The Safe Boot Alternate Shell option is useful when you need a command prompt but WinRE keeps failing. It boots Windows into a command-prompt shell with minimal startup items, which can be easier to reach than the recovery menus.

What if CMD opens then closes?

When cmd.exe flashes and closes, the cause is often a startup command or a command-line setting that changes behavior before you can type anything. A persistent session also helps, because cmd /k keeps the window open while cmd /c runs one command and exits.

Check AutoRun and extensions

  1. Open an elevated Command Prompt.
  2. Check the system-wide and per-user Command Processor settings for AutoRun command.
  3. Check the system-wide and per-user Command Processor settings for EnableExtensions.
  4. Set EnableExtensions to REG_DWORD 0x1 if extensions should be enabled, or 0x0 if you are testing a startup issue.
  5. Launch cmd /d /k to bypass AutoRun and keep the session open.

On Windows Server 2016, 2019, 2022, and 2025, group policy or startup scripts can also affect how cmd launches. If the window closes after one line, testing with cmd /d /k is the cleanest first check because it bypasses AutoRun before other variables are processed.

How do you fix disk or system file damage?

Use file and disk repair only after you know the recovery path works, or from a proper elevated Command Prompt. Start with sfc /scannow for Windows file integrity. If corruption persists, use DISM to check and repair the component store. If storage damage is suspected, check the disk before deeper fixes.

System file and disk repair

  1. Open an elevated Command Prompt.
  2. Run sfc /scannow to check corrupted or missing Windows files.
  3. Run DISM /Online /Cleanup-Image /ScanHealth to check the image.
  4. Run DISM /Online /Cleanup-Image /RestoreHealth to repair the image.
  5. Run DISM /Online /Cleanup-Image /StartComponentCleanup if component cleanup is needed.
  6. If the drive may be at fault, run wmic diskdrive get status, then chkdsk C: /R /F /X on the affected volume.

A common first-timer mistake is running chkdsk before checking drive status. If wmic diskdrive get status returns anything other than OK, the drive may need hardware attention. If the status is OK, chkdsk is still useful when the file system looks damaged.

Still not working?

Still not working?
A Windows Command Prompt window shows directory listings on a dark screen

If WinRE will not open, Startup Settings still fails, or Command Prompt only appears long enough to vanish, the recovery image or boot files are probably more damaged than a standard repair can fix. At that point, use another recovery route, then switch to offline repair from installation media or vendor support if the system will not stay in WinRE.

Escalation ladder

  1. Confirm whether you can reach Troubleshoot > Advanced options at all.
  2. If not, repair the recovery environment before running file checks.
  3. If Startup Settings appears but Safe Mode with Command Prompt does not, use MSConfig > Safe boot > Alternate shell.
  4. If disk health is poor, back up data before further repair.
  5. If the recovery image stays broken, use offline repair or professional support.

Prevention: if Command Prompt keeps disappearing after a reboot, avoid leaving unknown startup commands in the Command Processor settings, and keep an eye on disk health before corruption spreads.

Keep reading

Frequently asked questions

Why is Command Prompt missing from Advanced options?

The usual cause is a failed recovery path, not a missing program. If WinRE loads correctly, you should see Command Prompt under Troubleshoot > Advanced options. If the menu loops back to Windows or opens and then disappears, use a working elevated Command Prompt to run DISM /Online /Cleanup-Image /ScanHealth and /RestoreHealth.

What startup settings affect CMD?

Check the Command Processor settings for AutoRun and EnableExtensions. For startup testing, cmd /d bypasses AutoRun, and cmd /k keeps the window open so you can see what happens next.

Can I fix disk problems without Command Prompt in Advanced options?

If Advanced options is unavailable, not cleanly loading, or returning to Windows, you can still check the drive from a working elevated Command Prompt with wmic diskdrive get status. If storage corruption is suspected, chkdsk C: /R /F /X is the next repair step once you can reach an admin shell.