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 Windows Update Service não pode ser iniciado porque esses arquivos estão ausentes.)

também tentei

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.

Montei a imagem e tentei a partir daí.

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

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

retornando também:

Error: 0x800f081f

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

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

Carlos Gil
fonte
@ and31415, o pôster dessa pergunta girava em torno de seu problema, mas essa resposta não resolveu a minha.
Carlos Gil
1
Depois, você pode copiar o CSB.logarquivo (que geralmente pode ser encontrado C:\Windows\Logs\CBS) na área de trabalho, compactá-lo em um arquivo .zip / .7z e enviá-lo para algum lugar (por exemplo, ge.tt/about ). Poste aqui o link resultante para uma inspeção mais aprofundada.
and31415
Aqui está. Isto é CSB.logcriado por sfc /scannow CSB.log
Carlos Gil

Respostas:

22

Filtrando os detalhes

A execução do arquivo sfc /scannowproduzirá um CBS.logarquivo de relatório (geralmente encontrado em C:\Windows\Logs\CBS) que contém muitas informações. Para obter os bits interessantes, abra um prompt de comandos 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 que contém [SR], que acompanham as tentativas de reparo.

  2. Remova todas as linhas que contenham verifyo que obtivemos na etapa anterior para reduzir ainda mais a desordem.

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

Nesse caso, este 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, você pode ver o Verificador de Arquivos do Sistema tentando 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 (principal, secundário, construção e revisão).

  • pA = PROCESSOR_ARCHITECTURE_AMD64 (9),
    A arquitetura do processador direcionado .

  • Culture neutral, [...],
    Nome da cultura neutro ou relacionado , se localizado.

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

Existem três Generic.xbfarquivos que estão faltando. Além disso, todos eles compartilham esta informação:

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.

Reparação manual

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

  2. Extraia o .msuarquivo baixado usando o 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 archive do gabinete que contém os arquivos de atualização no diretório atual:

    expand Windows8.1-KB2914218-x64.cab -f:* %cd%
    
  5. Cada pacote possui um .manifestarquivo associado que lista os arquivos agrupados. Para determinar onde cada arquivo está armazenado, execute o seguinte comando substituindo packagaNamee fileName.extpelos 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 a etapa 5 para qualquer outro arquivo que precise ser corrigido.

  7. Assuma a propriedade e controle total sobre a C:\Windows\winsxspasta:

    takeown /f "%windir%\winsxs" /a
    icacls "%windir%\winsxs" /grant:r *S-1-5-32-544:(OI)(CI)(F) /q
    
  8. Crie qualquer 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. Restaure 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

and31415
fonte
Obrigado. SFC /SCANNOWnão resolveu nenhum problema depois disso.
Carlos Gil
Nossa isso é incrível! Por que você não escreve um tutorial em eightforums.com ou similar?
precisa