Como posso restaurar o executável 'cmd.exe'?

2

Eu me tranquei da minha velha máquina windows 7 (esqueci minha senha de administrador). No entanto, eu sei sobre este truque sethc.exe para redefinir um esquecido senha. Então, eu criei uma distribuição linux inicializável, troquei% executáveis sethc.exe e cmd.exe , inicializei janelas, defini uma nova senha admin, iniciei o linux e troquei os executáveis de volta. Infelizmente, eu estava muito entediado / não prestando atenção e acabei realmente excluindo meu executável cmd.exe .

Mesmo que o powershell funcione bem, não ter um cmd.exe pode levar a coisas inesperadas. Seria bom de alguma forma restaurar isso, mas eu não sou um administrador do Windows / não usei janelas por um bom tempo. Alguma idéia de como alguém poderia restaurar esse executável?

    
por alisianoi 05.01.2016 / 16:23

1 resposta

4

Como posso restaurar o cmd.exe executável?

Use sfc /scannow

System File Checker is a utility in Windows that allows users to scan for corruptions in Windows system files and restore corrupted files. This article describes how to run the System File Checker tool (SFC.exe) to scan your system files and to repair missing or corrupted system files. If a Windows Resource Protection (WRP) file is missing or is corrupted, Windows may not behave as expected. For example, some Windows functions may not work, or Windows may crash.

Como faço para executar a ferramenta Verificador de arquivos do sistema (SFC.exe)?

To do this, follow these steps:

Open an elevated command prompt

  • Windows 8.1 or Windows 8

    Swipe in from the right edge of the screen, and then tap Search. Or, if you are using a mouse, point to the lower-right corner of the screen, and then click Search. Type Command Prompt in the Search box, right-click Command Prompt, and then click Run as administrator. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow.

    A screenshot for this step.

  • Windows 10, Windows 7, or Windows Vista

    Click Start, type Command Prompt or cmd in the Search box, right-click Command Prompt, and then click Run as administrator. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow.

      A screenshot for this step.

At the command prompt

Type the following command, and then press ENTER:

    'sfc /scannow'

A screenshot for this step.

The sfc /scannow command will scan all protected system files, and replace corrupted files with a cached copy that is located in a compressed folder at %WinDir%\System32\dllcache. The %WinDir% placeholder represents the Windows operating system folder. For example, C:\Windows.

Note: Do not close this Command Prompt window until the verification is 100% complete. The scan results will be shown after this process is finished.

After the process is finished

You may receive one of the following messages:

  • Windows Resource Protection did not find any integrity violations.

    This means that you do not have any missing or corrupted system files.

  • Windows Resource Protection could not perform the requested operation.

    To resolve this problem, perform the System File Checker scan in safe mode, and make sure that the PendingDeletes and PendingRenames folders exist under %WinDir%\WinSxS\Temp.

  • Windows Resource Protection found corrupt files and successfully repaired them. Details are included in the CBS.Log %WinDir%\Logs\CBS\CBS.log.

    To view the detail information about the system file scan and restoration, go to How to view details of the System File Checker process.

  • Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log %WinDir%\Logs\CBS\CBS.log.

    To repair the corrupted files manually, view details of the System File Checker process to find the corrupted file, and then manually replace the corrupted file with a known good copy of the file.

Fonte Use a ferramenta Verificador de arquivos do sistema para reparar arquivos de sistema ausentes ou corrompidos

    
por 05.01.2016 / 20:01