Do note that you can always use the alternative solution of PowerShell, but the focus of this article is to find the cause of the problem and fix it accordingly.

Solution 1: Remove AutoRun Key in Registry

The Registry database consists of thousands or even millions of registry keys that store information about the configuration settings in Windows. Whenever you make changes to the system, they will be tracked and stored in the Registry database. Unfortunately, sometimes some of the registry keys can get corrupt or modified by drivers, software, updates, or malware infections. The same issue can cause CMD not to work properly. In this solution, we will remove the Auto-run key and see if this fixes the problem.

Step 2: Check against malware on your System

One of the reasons why this problem could occur is that your system files are infected by malware. We strongly recommend running the antivirus scan and verify if you have any malware on your system. We removing malware using Malwarebytes and restarting your system before checking the command prompt again.

Solution 3: Running System Restore

If the first two solutions do not work for you, we recommend using System Restore to restore to a previous snapshot of your System. System Restore is a tool integrated into Windows that can create checkpoints whenever you perform system change, install or update drivers. In case your Windows does not behave properly after the change, you will be able to restore it to the state when everything worked properly. The nice thing about checkpoints is that they can be created manually and automatically, both. To restore Windows to the previous state, System Restore must be enabled.

Fix: Chrome Scrollbar DisappearsFix: Surface Pro 3 Cursor DisappearsFix: CMD System Error 6118 occuredHow to Resolve CMD Error ‘DNS Server Not Authoritative for Zone’ Fix  CMD disappears after launching in Windows 10 - 44Fix  CMD disappears after launching in Windows 10 - 86