Command Prompt is one of the most important utilities in the Windows operating system and even Windows 11. The Command Prompt terminal also allows you to execute advanced commands and scripts. Many users have reported an issue where the Command Prompt has stopped working or won’t open at all on their Windows 11 PCs.
Here, we have put together a list of troubleshooting methods that can get the Command Prompt back to working status on your Windows 11 system. Continue reading this article.
1. Simply hold down the Windows and R keys to open Run.
2. Enter services.msc and press Enter to open the Windows service.
#3. Find the Performance Logs and Alerts service in the service list.
4.Right click on the service and select Properties.
5. In the Properties window, use the drop-down box to change the Startup type to Automatic.
6. Click Apply and then click OK.
7. Now, back to the Services window, click Start## in the left pane #" link to start the service.
Check if this helps resolve the command prompt issue. Fix 2 – Edit Local Group Policy Editor1. Press and hold the Windows and R keys simultaneously to open the Run dialog box.
2. Typegpedit.msc and press Enter to open the Local Group Policy Editor.
3. In theLocal Group Policy Editor window, select User Configuration.
4. Now, selectAdministrative Templates –> System.
5. On the right, look for the setting called "Block access to Command Prompt".
6.Double-click Settings to open it.
7. Make sure to select theDisabled or Not configured option for the Block access to the command prompt setting.
8. ClickApply, and then click OK.
9. Check if the command prompt is open and working properly. Fix 3 – Create a desktop shortcut1.Right-click on any empty area on the desktop.
2. SelectNew, and then select Shortcut in the submenu.
3. In theCreate shortcut window, type ## in the text box below the project location #cmd.exe. Click Next.
4. Name the shortcut
and clickto finish.
5. After creating this Command Prompt shortcut on your desktop,
right-clickon it and select Properties.
6. In the
Propertieswindow, go to the Shortcuts tab and click "Advanced" button.
7. Here,
check theRun as administrator option and click OK.
8. Click Apply and then click OK in the Properties window to close it after saving the changes.
Check if you are able to open the command prompt without any issues.
1. Click the Windows key and enter powershell.
2. Right-click Windows PowerShell in the search results and select Run as administrator.
3. Enter the command and execute it.
sfc /scannow
4. Wait for some time until the scan is completed. It will detect and fix problem files on your PC.
5. Check whether the problem has been resolved. If the problem persists, perform a DISM scan.
6. Open Powershell and execute the following command
DISM /在线 /Cleanup-Image /RestoreHealth
7. After the scan is completed, check whether the command prompt is working normally.
1. Press Windows R to openRun.
2. Type sysdm.cpl to open the system configuration.
#3. Go to the Advanced tab here.
4. Click the Environment Variables... button at the bottom.
#5. In the window that opens, select the Path variable in the User Variables section. Click the Edit... button.
#6. Now, click New to enter the new path for the environment variable.
7. Type C:\Windows\SysWow64\ and click OK.
8. Click OK to close all other open windows.
9.Restart the computer and check if you are able to use the command prompt again.
1. Click the Windows key and enter restore in the search box.
2. Select to create a restore point in the search results.
3. In the System Protection tab, click the System Restore button.
4. You can select a different restore point or select a recommended restore point.
5. If you chose Select a different restore point, please select a restore point from the list. Click Next.
6.Confirmselected restore point and click Finish to start the process.
#7. After the system restore is complete, check that the command prompt is working as expected.
The above is the detailed content of Fix: Command Prompt doesn't work or won't open on Windows 11 or 10. For more information, please follow other related articles on the PHP Chinese website!