[Fix] Windows 10 booting to command prompt instead of Explorer.exe

Here I will show you a fix for the File Explorer not running automatically as it should. You may be seeing only a blank screen with a Cmd.exe window instead of your normal desktop when you log in to your Windows computer. I encountered this issue recently and would like to share what worked for me, since the methods that a quick Google search found did not work in my case.

The issue here can be one of two registry entries, in particular the Shell entry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon, and the same Shell entry under HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon. Both of these should have the Shell value of explorer.exe. If either of these have a value of %comspec%, then that is what’s causing your problem. If you are not familiar with the Windows Registry Editor, then continue reading for the permanent fix below.

For a temporary fix, and to verify that your Explorer.exe is intact, you can press Ctrl+Alt+Delete and open Task Manager, click File -> Run New Task, then enter Explorer.exe. This will get you to your normal desktop, but once you reboot your computer again, you will be back to the command prompt.

On to the permanent fix: You will need to check two registry entries. Press the Windows Key + R to open the Run dialog, and enter “regedit” to open the registry editor. Once there, navigate in the left pane to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Then look in the right side pane and find the entry named Shell. It should say explorer.exe. If it says %comspec% or anything else other than explorer.exe, right-click on it and choose Modify and change the Value data to explorer.exe.

Next, check another registry entry. In the left pane, browse to:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

(It is a similar path as the previous one, but under HKEY_CURRENT_USER rather than HKEY_LOCAL_MACHINE.) This one also needs to have the Shell value on the right pane to be explorer.exe. If it has the value of %comspec%, then that will force your computer to display the command prompt window instead of your normal desktop.

The registry entry in Registry Editor

After fixing these two entries, close the editor and reboot your computer to verify that the problem has been fixed. Now is also a good time to run a malware scan in case a piece of malware is causing the change.

Hope this helps.