how to run src on windows 11

Lee Davis 0 Reputation points
2025-11-29T17:17:27.23+00:00

I'm trying to re-install cmd.exe. opened a powershell and ran src /scannow.

It says I don't have admin rights but I am logged in as admin.

How do I get a new copy of Windows 11 cmd.exe file?

Thanks,

Lee

Windows for home | Windows 11 | Install and upgrade
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-29T17:18:38.1966667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    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:

    1. 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.
    2. Run the Command:
      • In the elevated PowerShell or Command Prompt window, type the command:
             sfc /scannow
        
      • Press Enter to execute 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:

    1. Open an elevated Command Prompt as described above.
    2. Run the following command to repair the Windows image:
         DISM /Online /Cleanup-Image /RestoreHealth
      
    3. After the process completes, try running sfc /scannow again.

    This should help you get a new copy of the cmd.exe file if it was corrupted or missing.


    References:

    0 comments No comments

  2. Ramesh Srinivasan 68,565 Reputation points Independent Advisor
    2025-11-29T17:58:54.3266667+00:00

    Hi Lee,

    The correct command is sfc /scannow. To run SFC, you need to run an elevated PowerShell or Command Prompt window.

    1. Press Win + R to open the Run dialog.
    2. Type powershell.exe in the text box.
    3. Press Ctrl + Shift + Enter simultaneously. This key combination will launch PowerShell with administrative privileges.
    4. If prompted by UAC, click "Yes."

    This opens PowerShell (admin).


    Also, please explain why you're trying to restore cmd.exe. Can you open Command Prompt by running these commands from the Run dialog?

    C:\Windows\System32\cmd.exe
    

    (or)

    C:\Windows\SysWOW64\cmd.exe
    
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.