Fix Windows 10 Black Screen and Command Prompt on startup

Yesterday, all in a sudden, my command prompt stopped working. Windows PowerShell was working just fine. But any program that used cmd and `Run > cmd.exe` itself wasn’t working.

So, I restarted my PC. Now, all in a sudden, my PC started up with a black screen and the Command Prompt window was being displayed there like a haunting ghost. Turns out, some software update done messed up my Shell.

So, googling began. And it kept going on. And I learned one thing: How you word your searches, matters.

After a while, I found the fix thanks to this post at Linus Tech Tips.

Basically, this is what you have to do (most likely):

Step1: Create a System Restore point. You are responsible for trying this and you must have a backup point that you can return to if things go bad.

Step 2: Just to cover our bases, start PowerShell with administrative privilege. Run the following lines of command:

sfc /scannow (mind the space)

Dism /Online /Cleanup-Image /CheckHealth

Dism /Online /Cleanup-Image /ScanHealth

Dism /Online /Cleanup-Image /RestoreHealth

These will scan your system for corrupted files and repair them.

If they find nothing, Go to step 3.

Step 3: go to Run, or press Win + R and type regedit.

Now, be careful with this. This is the entrails of your system. You don’t want to mess things up here.

Go to this location: Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

Look for an entry named Shell:

Registry Editor

Make sure that you actually have this and it displays this %comspec% value.

Now, delete that entry by right clicking on Shell and clicking on delete.

Now, reboot your system and you’re done!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.