To run the sfc /scannow command successfully, you need to ensure that you are running PowerShell or Command Prompt with elevated privileges (as an administrator). Here’s how you can do that:
- Open PowerShell or Command Prompt as Administrator:
- Right-click on the Start button or press
Windows key + X. - Select Windows Terminal (Admin) or Windows PowerShell (Admin) from the menu.
- If prompted by User Account Control (UAC), click Yes to allow.
- Right-click on the Start button or press
- Run the Command:
- In the elevated PowerShell or Command Prompt window, type the command:
sfc /scannow - Press Enter to execute the command.
- In the elevated PowerShell or Command Prompt window, type the command:
If you are still having issues with the cmd.exe file itself, you can restore it by running the DISM tool to repair the Windows image. Here’s how to do that:
- Open an elevated Command Prompt as described above.
- Run the following command to repair the Windows image:
DISM /Online /Cleanup-Image /RestoreHealth - After the process completes, try running
sfc /scannowagain.
This should help you get a new copy of the cmd.exe file if it was corrupted or missing.
References: