PC stuck in command prompt on boot, Windows 10

Hello everyone. Recently I tried rebooting my PC in safe mode because I've been having problems with random crashes, and by some accident I made it boot up in command prompt. I have no idea how to make it start up normally again. No commands seem to work and typing exit merely makes the screen go completely black.

Is there any way to 'reset' the system so that it boots up normally? Google hasn't yielded anything too useful in this regard and I get the feeling I'm missing something very obvious.

I can post my system info if it's relevant.


Discussion is locked

Reply to: PC stuck in command prompt on boot, Windows 10
PLEASE NOTE: Do not post advertisements, offensive materials, profanity, or personal attacks. Please remember to be considerate of other members. If you are new to the CNET Forums, please read our CNET Forums FAQ. All submitted content is subject to our Terms of Use.
Reporting: PC stuck in command prompt on boot, Windows 10
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
- Collapse -
Re: command prompt tells how to start Windows 10 in Safe Mode. "Try rebooting" doesn't seem to be a supported way.

Anyway, next time it should start normally again. Get your Windows 10 install DVD/USB-stick (or download it using the MEDIA CREATION TOOL, google that if you don't know) or the WINDWOS RECOVERY DRIVE you made (it's highly recommended, but few people do it) to see if startup repair or any of the other options work. If not, use that same medium for a reinstall.
- Collapse -
Not sure I understand

The problem is, I'm not even able to gain access to my own desktop (I'm writing all of this from another PC). I'm stuck in command prompt when I boot up my PC, with no way to proceed. Seeing as all the options provided in that link involve accessing safe mode from the desktop as opposed to the command prompt, I don't understand how they help. Can you clarify?

Also, is it correctly understood that I may have to do a reinstall of windows?

- Collapse -
Re: gain access

Make that Windows 10 install media (if you don't have it - many people don't) on another PC, then boot from it on your own PC and see what recovery and repair you can do.

If all repair fails, reinstall is the next step indeed.
If you have a current backup of your data and the install/setup program of everything you installed, and all Windows 10 drivers that aren't on the Windows 10 disk, and you don't rely on cookies or your browsers password manager for automatic passwords that is more or less doable.

I hope you realise that random crashes can be very well be caused by hardware issues. In that case, reinstalling Windows won't help. So it makes some sense to boot from a Linux disk or stick (free to make) first and use that for a few days (there's a browser and a word processor, no games) to see if it's stable. If that crashes often also, that surely points to a hardware issue.

- Collapse -

Does (ctrl>alt>delete) get you to a different screen?

On this machine...not gets me to a screen that has an option to restart.
That gets me back to a normal system boot.

- Collapse -

Yes. However, restarting after pressing ctrl alt delete brings me right back to the command prompt screen. It seems to be stuck in a loop. Also, any command I type into the prompt isn't recognized by the system. I tried 'bcdedit /deletevalue {current} safeboot', which I was told would restart the PC in normal mode, but I just get a message that says the command isn't a valid one.

- Collapse -

Also, typing exit will make the command prompt shut down. I think this is supposed to bring you back to the desktop, but the screen just goes black indefinitely.

- Collapse -
Re: bcdedit

That's an external command. "Any command" includes internal commands, and most likely isn't true.

What directory are you in in the command prompt?
Very big chance that path, cd and dir work (those are internal commands). Then cd to the folder bcdedit is in (here in Windows 7 it's c:\windows\system32) and try again.

- Collapse -

the directory I'm in is called C:\windows\system32

Could you spell out for me what exactly I do from here? i have a hard time following. Much appreciated!

- Collapse -
Re: path

Sorry for the delay. Only now I have a Windows 10 system at hand to check.

With me, bcdedit.exe is in the c:\windows\system32 folder indeed, so typing bcdexit runs it. Now there are 2 options:
1. It isn't present with you. Then something is seriously wrong. Two commands to try:
- dir bcdexit.* should list bcdexit.exe (416 kB)
- bcdexit should run it and show the current configuration
2. You forgot the space after bcdedit in the command you typed. Then it's invalid indeed.

It's all basic MS DOS. Unchanged since 1980 (except there was no bcdedit then).

- Collapse -
run a scan with Farbar Recovery Scan Tool.

Try to run a scan with Farbar Recovery Scan Tool.
There is a virus on your computer, after scanning all your virus will remove.

- Collapse -
Re: virus

To me, this doesn't look like a virus. And how should he be able to download and run that scan tool if he can't even do anything in the recovery environments command prompt?

- Collapse -
Can go further...

This will not fully solve this problem but... You should be able to hold Ctrl+Alt+Del and get to blue screen list. Select Task Manager. Click 'File' at the upper left, 'Run new task' and in the 'Open:' box type 'explorer'. This will bring up a near 'normal' background that you can navigate. You can close the command prompt window whenever you like. However, the 'Safe Mode' indicators will still be in all four corners of desktop. I'm still working on how to break the safemode cycle... my friends computer was the victim of ransomware, and breaking out of that hold could be responsible for this. Maybe you have a different idea?

- Collapse -
This worked for me

I was having the same problem as this dude after running a antivirus scan and rebooting, and typing explorer into cmd fixed it temporarily for me. I’ll have to figure out why it’s doing this still

- Collapse -
can go further than further...

Hold Ctrl+Alt+Del and select task manager. click 'open' and select run. type 'msconfig' in the run box and 'enter'. This will bring up the startup controls. On mine, safe mode was selected, so it would keep booting to safemode forever. So, unselect safe mode and Viola! reboot and rejoice! Hope this works for you...

- Collapse -
After Login stuck in command prompt

Once at the window hit CTRL-ALT-DEL

Click Task Manager
Click File Run new task
In the open Box type msconfig and hit enter

Note: You may see it running in task manager but not see a window for it. If this happens you will have to hit ALT-TAB until you get the system config screen on top. It may take a few tries.

Now make sure the following is clicked on the general tab.

Normal Startup

Now click the boot Tab at top.
Make sure Safe Boot Is unchecked.
** If Safe Boot is checked and Alternate shell is selected, this is a sign of a possible malware kidnapping. Most likely before this happened you got a message saying your system is infected please call 888-558-2612 or some such message.

Make sure no other check boxes are selected on this screen.

Click the Apply button.

If your screen starts flashing a bit, hit ALT-TAB, you are looking for a dialog box asking you to restart.

When you see the restart dialog box click Okay.

Your system should now restart and run normal for you. Once it is back, I would encourage you to run a virus and malware scan. If you do not have the appropriate software, do a search on cnet and they will have some good pointers on software for you.

Tonight my sister in law got the infection pop up window. She called the 800 number and they said no problem we will fix it for like $250.00 dollars when she said no the person got angry, and she hung up. Apparently along the line they remoted in to her system. She notice the mouse moving by its self after she was off the phone, so she disconnected the internet.

I am passing this along, just as a reminder no reputable company will pop an 800 number on your screen telling you they can fix a problem. Also do not let unknown companies remote in to your system. I hope this helps some of you get back and running.


- Collapse -
just run explorer and windows should start

At the command prompt that you are booting into, just run explorer and windows should start

- Collapse -
Thanks this one works for me
- Collapse -
This Worked!

I know this is an old post and I loved that it was still here. I just had the same issue where Windows 10 would only start with a small CMD Prompt Window stuck on the system32 directory. Running Explorer in task manager allowed me to see the desktop again! Thank you.

- Collapse -
Have you found a permanent fix?

I have the same exact problems. Windows 10 boots straight to a black screen with CMD prompt after login and nothing works besides typing explorer which shows my desktop only until I shutdown/restart my pc and the problem is back again. Is there a permanent fix from stopping this happening after every start up?

- Collapse -
The last time I ran into this I ran MSCONFIG. noted W10 as well. So I change the boot there to normal or to safe then normal (use apply if that button shows) and it was fixed. HOWEVER not all damage is the same and some owners were tinkering with the OS or its folders and files so the worst case is a clean install.
- Collapse -
Had same Prob.

Type explorer.exe into command window. I had the same problem typing explorer.exe into lets your windows continue as normal but if your PC's like mine you'll have this every time this happens.

- Collapse -
Simple procedure

When you are stuck in command prompt and not able open the windows , try"crtl+alt+del" .
And open task manager , in task manager go to file-} open new task and type "explorer.exe" and ur windows open then try to do the full system restore and it should work now

- Collapse -
Solved for me - explorer starts on startup again!

Hit windows+R > type regedit > navigate: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run > add new value, call it whatever you want and put in destination of explorer.exe

- Collapse -
Here's how I solved the problem on my machine

Quick stop-gap solution:
- in the command prompt simply type "explorer" and press enter.

Here's what solved it for me:
- Hold down the windows key and press R (a small window will appear with a text box)
- type "regedit" and press enter (this will open the registry editor)
- open the following path: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
- If that folder contains an entry called "Shell" and that entry has the value "%comspec%" remove it (right click then "Delete") (PS: You can also replace the value with "explorer.exe")
- reboot your computer and it should boot as usual.

You can achieve the same result by running this command:
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "Shell" /t REG_SZ /d "explorer.exe" /f

What this does is overwrite the bad value with "explorer.exe" which is what it should be.

Post was last edited on May 9, 2019 10:00 PM PDT

- Collapse -

Thanks so much man worked a treat.....

- Collapse -

I have the same thing going on, but when I try to type a command, whatever I press, nothing shows up....even when I try CTRL+ALT+DELETE....nothing. Its acting as if my keyboard was not on, but it was working fine before I tried restarting.

- Collapse -

...your pet pig knocked it loose or was piggybacking the cord?

- Collapse -
"HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVers

Thx bro....

CNET Forums

Forum Info