Como reparar arquivos de sistema corrompidos de um disco de instalação

14

Estou usando o Windows 8.1 x64, compilação 6.3.9600.16384 usando o prompt de comando com privilégios de administrador.

sfc /scannow

retorna:

...found corrupt files but was unable to fix some of them.

e

dism /online /cleanup-image /restorehealth

retorna:

Error: 0x800f0906
The source files could not be downloaded.

(e o Serviço Windows Update não consegue iniciar porque esses arquivos estão faltando.)

também tentou

dism /online /cleanup-image /restorehealth /source:wim:F:\sources\install.wim:1 /limitaccess

e retornou:

Version: 6.3.9600.16384
Image Version: 6.3.9600.16384
Error: 0x800f081f
The source files could not be found.

Eu montei a imagem e tentei de lá.

dism /mount-image /imagefile:F:\sources\install.wim /index:1 /mountdir:C:\offline

dism /online /cleanup-image /restoreHealth /source:c:\offline /limitaccess

também retornando:

Error: 0x800f081f

Como faço para reparar os arquivos corrompidos do sistema?

Posso dizer ao DISM para usar o disco de instalação do Windows como fonte?

    
por Carlos Gil 19.02.2014 / 10:19

2 respostas

22

Filtrando os detalhes

A execução do sfc /scannow produzirá um arquivo de relatório CBS.log (geralmente encontrado em C:\Windows\Logs\CBS ) que contém muitas informações. Para obter os bits suculentos, abra um prompt de comando e execute este comando:

findstr /i /c:"[SR]" "%windir%\Logs\CBS\CBS.log" | findstr /i /v /c:"verify" > "%userprofile%\Desktop\sfc.txt"

O comando acima irá:

  1. Obtenha todas as linhas no arquivo original contendo [SR] , que são as que rastreiam as tentativas de reparo.

  2. Remova todas as linhas que contêm verify do que recebemos na etapa anterior para reduzir ainda mais a desordem.

  3. Escreva os resultados no arquivo sfc.txt para análise posterior.

Nesse caso, esse seria o arquivo resultante:

2014-02-19 17:08:47, Info                  CSI    0000008b [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-Main, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:49, Info                  CSI    0000008c [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-Main, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:49, Info                  CSI    0000008d [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:08:51, Info                  CSI    00000091 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:53, Info                  CSI    00000092 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:53, Info                  CSI    00000093 [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:08:56, Info                  CSI    00000097 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-MediaViewerDistributed-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:57, Info                  CSI    00000098 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-MediaViewerDistributed-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:57, Info                  CSI    00000099 [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:23:00, Info                  CSI    00000975 [SR] Repairing 3 components
2014-02-19 17:23:00, Info                  CSI    00000977 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-Main, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    00000978 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    00000979 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-MediaViewerDistributed-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    0000097a [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    0000097b [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:23:00, Info                  CSI    0000097c [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-Main, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    0000097d [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:23:00, Info                  CSI    0000097e [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-MediaViewerDistributed-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    0000097f [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:23:00, Info                  CSI    00000980 [SR] Repair complete
2014-02-19 17:23:00, Info                  CSI    00000981 [SR] Committing transaction

Identificando os problemas

Verificando o arquivo que você pode ver, o Verificador de arquivos do sistema tentou reparar 3 componentes, mas falhou:

2014-02-19 17:23:00, Info                  CSI    00000975 [SR] Repairing 3 components
2014-02-19 17:23:00, Info                  CSI    00000977 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-Main, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    00000978 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    00000979 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-MediaViewerDistributed-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing

Cada entrada segue este esquema aproximado:

  • Cannot repair member file [...]"Generic.xbf"
    O arquivo que precisa ser reparado.

  • of Microsoft-Windows-Camera-LockScreenCamera-Main,
    O nome do pacote ao qual o arquivo pertence.

  • Version = 6.3.9600.16485,
    Versão do arquivo (maior, menor, compilação e revisão).

  • pA = PROCESSOR_ARCHITECTURE_AMD64 (9),
    A arquitetura de processador segmentada.

  • Culture neutral, [...],
    Seja neutro ou o nome da cultura relacionado, se localizado.

  • file is missing
    Motivo pelo qual o arquivo precisa ser reparado.

Existem três arquivos Generic.xbf que estão faltando. Além disso, todos eles compartilham esse dado:

2014-02-19 17:23:00, Info                  CSI    0000097b [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"

Isso significa que o arquivo está incluído na atualização do Windows KB2914218.

Reparo manual

  1. Obtenha o pacote de atualização KB2914218 .

  2. Extraia o arquivo .msu baixado usando 7-Zip em uma pasta com o nome do arquivo original (por exemplo, Windows8.1-KB2914218-x64 ).

  3. Abra um prompt de comando como administrador e navegue até a pasta real usando o seguinte comando:

    cd /d "X:\Whatever\Windows8.1-KB2914218-x64"
    
  4. Expanda o arquivo de gabinete contendo os arquivos de atualização no diretório atual:

    expand Windows8.1-KB2914218-x64.cab -f:* %cd%
    
  5. Cada pacote tem um arquivo .manifest associado que lista os arquivos incluídos. Para determinar onde cada arquivo é armazenado, execute o seguinte comando substituindo packagaName e fileName.ext pelos valores reais:

    for /f "delims=" %A in ('"findstr /i /m /c:"packageName" *.manifest"') do @for /f "delims=" %B in ('"findstr /i /m /c:"fileName.ext" %A"') do @echo %~nB;fileName.ext>>fixes.txt
    

    Por exemplo:

    for /f "delims=" %A in ('"findstr /i /m /c:"Microsoft-Windows-Camera-LockScreenCamera-Main" *.manifest"') do @for /f "delims=" %B in ('"findstr /i /m /c:"Generic.xbf" %A"') do @echo %~nB;Generic.xbf>>fixes.txt
    
  6. Repita o passo 5 para qualquer outro arquivo que precise ser corrigido.

  7. Assuma o controle total sobre a pasta C:\Windows\winsxs :

    takeown /f "%windir%\winsxs" /a
    icacls "%windir%\winsxs" /grant:r *S-1-5-32-544:(OI)(CI)(F) /q
    
  8. Crie uma pasta ausente:

    for /f "tokens=1 delims=;" %G in (fixes.txt) do @if not exist "%windir%\winsxs\%~G\" @md "%windir%\winsxs\%~G"
    
  9. Assuma o controle total das pastas necessárias:

    for /f "tokens=1 delims=;" %G in (fixes.txt) do takeown /f "%windir%\winsxs\%~G" /a >nul & icacls "%windir%\winsxs\%~G" /grant:r *S-1-5-32-544:(OI)(CI)(F) /q
    
  10. Restaurar os arquivos:

    for /f "tokens=1,2 delims=;" %A in (fixes.txt) do copy /y ".\%A\%B" "%windir%\winsxs\%A\%B"
    
  11. Repita a verificação do arquivo do sistema para garantir que os problemas foram corrigidos:

    sfc /scannow
    

Referências

por 26.02.2014 / 12:27
1

Se o Windows não puder inicializar, você poderá executar o SFC no console de recuperação do Windows:

sfc /scannow /offbootdir=d:\ /offwindir=d:\windows

Extraído de: link

    
por 16.03.2016 / 11:38