华强北电脑城 龙岗电子世界 龙华电脑城  凯尔电脑

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1736|回复: 1

使用系统文件检查器工具修复丢失或损坏的系统文件

[复制链接]
发表于 2016-8-16 16:36:18 | 显示全部楼层 |阅读模式
使用系统文件检查器工具修复丢失或损坏的系统文件[size=1.4em]Windows 8.1 Windows 8.1 Enterprise Windows 8.1 Pro Windows 8 Windows 8 Enterprise Windows 8 Pro Windows 7 Enterprise Windows 7 Home Basic Windows 7 Home Premium Windows 7 Professional Windows 7 Starter Windows 7 Ultimate Windows Vista Enterprise 64-bit Edition Windows Vista Ultimate 64-bit Edition Windows Vista Business Windows Vista Business 64-bit Edition Windows Vista Enterprise Windows Vista Ultimate Windows 10% @' a( u& [; d% V4 [  l
, X" r3 i. b/ g  k
[size=1.6em]如果某些 Windows 功能不工作或 Windows 崩溃,请使用系统文件检查器扫描 Windows 并还原文件。 
& R- x) z, q+ O* m; `1 ]# y/ Q   t$ t% y* p& S
虽然下面的步骤初步看上去可能比较复杂,但只要按顺序逐步操作,我们会让你重新步入正轨。
运行系统文件检查器工具 (SFC.exe)
[size=1.6em]为此,请按照下列步骤操作:
  • [size=1em]打开权限提升的命令提示符。 为此,请根据你的具体情况执行以下操作:
  • [size=1em]如果运行的是 Windows 10、Windows 8.1 或 Windows 8,在运行系统文件检查器之前,请先运行收件箱部署映像服务和管理 (DISM) 工具。  (如果运行的是 Windows 7 或 Windows Vista,请跳到步骤 3。)
    6 r/ v- i" X1 M  Z9 L8 [8 A
[size=1.6em]键入以下命令,然后按 Enter 键。  命令操作可能需要几分钟才能完成。
[size=1.6em]DISM.exe /Online /Cleanup-image /Restorehealth
[size=1.6em]重要说明: 当运行此命令时,DISM 通过 Windows 更新提供修复损坏所需的文件。 但是,如果 Windows 更新客户端已断开,则会将正在运行的 Windows 安装用作修复来源,或者将来自网络共享或可移动媒体(例如 Windows DVD)的 Windows 并行文件夹用作文件来源。 为此,请改为运行以下命令:
[size=1.6em]DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows /LimitAccess
[size=1.6em]注意: 请使用修复来源的位置替换 C:\RepairSource\Windows 占位符。 有关使用 DISM 工具修复 Windows 的更多信息,请参考修复 Windows 映像
  • [size=1em]在命令提示符处,键入以下命令,然后按 Enter 键:

    % y3 k5 [$ j! E8 v
[size=1.6em]sfc /scannow
[size=1.6em]
% C$ K  R# d2 Y. k# E1 n
. E8 K5 ?3 @% U/ v
[size=1.6em]sfc /scannow 命令将扫描所有受保护的系统文件,并用位于 %WinDir%\System32\dllcache 的压缩文件夹中的缓存副本替换损坏的文件。
0 \. m' W# x0 R%WinDir% 占位符代表 Windows 操作系统文件夹。 例如:C:\Windows。" Q& }; I; `8 G9 g6 j

- g( s/ i9 r8 X$ n3 U! Z! [注意 在验证 100% 完成之前,请勿关闭此命令提示符窗口。 此流程完成后将显示扫描结果。
  • [size=1em]流程结束后,你可能收到以下消息之一:
    • [size=1em]Windows 资源保护找不到任何完整性冲突。
      [size=1em]  F( Z+ l" O. A2 }) H# k
      这表示您没有任何丢失或损坏的系统文件。
    • [size=1em]Windows 资源保护无法执行请求的操作。
      [size=1em]
      . T2 {$ }4 d9 m/ |& ~  v要解决此问题,请在安全模式中执行系统文件检查器,并确保 PendingDeletes 和 PendingRenames 文件夹存在于 %WinDir%\WinSxS\Temp 下。
    • [size=1em]Windows 资源保护找到了损坏的文件并已成功将其修复。 详细信息包含在 CBS.Log(路径为 %WinDir%\Logs\CBS\CBS.log)中。
      [size=1em]
      # D% C6 n' U  I若要查看有关系统文件扫描和还原的详细信息,请转到如何查看系统文件检查器进程的详细信息
    • [size=1em]Windows 资源保护找到了损坏的文件但无法修复其中的某些文件。 详细信息包含在 CBS.Log(路径为 %WinDir%\Logs\CBS\CBS.log)中。
      [size=1em]: S6 N( C' m- {& l# {
      若要手动修复损坏的文件,请查看系统文件检查器进程的详细信息查找损坏的文件,然后手动将损坏的文件替换为已知完好的文件副本

      ! \+ S; S! R6 {# q# H7 o9 N% n$ o

    % v5 W; c& J2 U6 d, _5 y7 ~. m# }
+ U2 {, O- z, y" o& ^3 d
Windows 8.1 或 Windows 88 @1 R, N. Z0 M9 x  Y2 O

2 o3 t- ^6 D5 O4 }+ g2 |
/ n' Q" O5 n# B+ H+ L8 \* N
; N# J+ _  M5 H  J8 s+ ^* VWindows 10、Windows 7 或 Windows Vista
! }  o$ b6 h+ J+ |0 Z! J2 J* Y4 v
1 i, o' ~% q5 a: U+ b
' l- m; a' L7 V& a" `+ {
更多信息如何查看系统文件检查器进程的详细信息
[size=1.6em]若要查看 CBS.Log 文件中包含的详细信息,可以使用 Findstr 命令将信息复制到 Sfcdetails.txt 文件,然后查看 Sfcdetails.txt 中的详细信息。 为此,请按照下列步骤操作:
  • [size=1em]打开上文步骤 1 所述的提升的命令提示符。
  • [size=1em]在命令提示符处,键入以下命令,然后按 Enter 键:
    findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
    [size=1em]注意 Sfcdetails.txt 文件包含每次系统文件检查器工具在计算机上运行时的详细信息。 文件包括有关系统文件检查器工具未修复文件的信息。 验证日期和时间项以确定该问题文件为你上次运行系统文件检查器工具时找到的文件。
  • [size=1em]从你的桌面打开 Sfcdetails.txt 文件。
  • [size=1em]Sfcdetails.txt 文件使用以下格式:
    [size=1em]日期/时间 SFC 详细信息 以下示例日志文件包含无法修复的文件项: 2007-01-12 12:10:42, Info CSI 00000008 [SR] Cannot repair member file [l:34{17}]"Accessibility.dll" of Accessibility, Version = 6.0.6000.16386, pA = PROCESSOR_ARCHITECTURE_MSIL (8), Culture neutral, VersionScope neutral, PublicKeyToken = {l:8 b:b03f5f7f11d50a3a}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing

    + L) v9 l( A- w9 ?; e# }
/ Y+ x6 n( M' }
[size=1.6em]: I0 b  T) u, g9 a. B1 {
如何手动将损坏的系统文件替换为已知完好的文件副本
[size=1.6em]当你确定哪个系统文件已损坏且无法通过 Sfcdetails.txt 文件中的详细信息修复之后,查找损坏文件所在的位置,然后手动将损坏的文件替换为已知完好的文件副本。 为此,请按照下列步骤操作:
, {# m9 h$ O- t1 B
/ D, S2 N" {7 s) @; }8 _% @注意 你可能可以从与你的计算机运行相同版本的 Windows 的另一台计算机获取系统文件的已知完好副本。 你可以在该计算机上执行系统文件检查器进程,以确保要复制的系统文件是完好的副本。
  • [size=1em]获得损坏的系统文件的管理所有权。 为此,在提升的命令提示符处,复制并粘贴(或键入)以下命令,然后按 Enter 键:
    [size=1em]takeown /f Path_And_File_Name 注意 Path_And_File_Name 占位符代表损坏文件的路径和文件名。 例如,键入 takeown /f C:\windows\system32\jscript.dll。
    * q9 m& B2 i% I+ y/ S  l. [+ ~/ x6 M
  • [size=1em]授予管理员完全访问损坏的系统文件的权限。 为此,复制并粘贴(或键入)以下命令,然后按 Enter 键:
    [size=1em]icacls Path_And_File_Name /GRANT ADMINISTRATORS:F 注意 Path_And_File_Name 占位符代表损坏文件的路径和文件名。 例如,键入 icacls C:\windows\system32\jscript.dll /grant administrators:F。( H+ X: b$ o0 o- Y1 _; t
  • [size=1em]将损坏的系统文件替换为已知完好的文件副本。 为此,复制并粘贴(或键入)以下命令,然后按 Enter 键:
    [size=1em]复制 Source_File Destination 注意 Source_File 占位符代表计算机上已知完好的文件副本的路径和文件名,Destination 占位符代表损坏文件的路径和文件名。 例如,键入 copy E:\temp\jscript.dll C:\windows\system32\jscript.dll。

    . i1 A# D5 q$ o: d2 n3 W
回复

使用道具 举报

 楼主| 发表于 2023-3-11 21:59:14 | 显示全部楼层
Repair a Windows Image
2 F6 M' G. _9 y2 z: Z+ oArticle2 `, F* w& y" f
02/10/20141 B. h0 x( {& D  \0 ?+ O0 [8 }
2 minutes to read6 J% `& [* A$ m9 D/ L2 t1 {
Applies To: Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2
/ m8 z$ X, i* R% i: Y9 s  v4 Z
6 G  o; ]& |, f! o$ T1 [7 T* _* KIf a Windows image becomes unserviceable, you can use the Deployment Imaging and Servicing Management (DISM) tool to update the files and correct the problem. You can use DISM to repair an offline Windows image in a WIM or VHD file, or an online Windows image. An online Windows image will also attempt to repair itself if it becomes unserviceable. The repair source for this operation is the same source that is used for Features on Demand and is determined by Group Policy settings. For more information, see Configure a Windows Repair Source. When you use the DISM tool to repair an online or offline image, you can use the /Source argument with the /RestoreHealth argument to specify additional repair source locations to use to search for the required files.# Z0 Y/ ?% g! q
( q0 k! M/ s4 @/ D( j/ m' t
The DISM /ScanHealth, /CheckHealth, and /RestoreHealth arguments can only be used when servicing Windows® 8 or Windows Server® 2012 images.
% b' @7 o& z" h6 y6 N$ s
4 c$ @9 m: J+ O) _7 {- E* d& jTo check if an image is repairable0 F' c5 d' o% e1 V/ P1 o% h9 X
Scan the image to check for corruption. This operation will take several minutes. For example, at a command prompt, type the following command:
- M  C9 K* z# y. y  v7 I$ i% l1 a# A. _8 L; t

5 r3 R+ I8 Z) ?8 f1 VCopy1 ~0 Z% B, O& Q! e; m. E# e
Dism /Online /Cleanup-Image /ScanHealth
, l0 v" J/ l4 ~Check the image to see whether any corruption has been detected. For example, at a command prompt, type:
  e' k: N. i# _4 x1 t. b% `3 X. i8 i: n5 J
" X" F0 h$ J8 S
Copy1 {/ D, R8 G( a& |3 C
Dism /Online /Cleanup-Image /CheckHealth$ K7 I" b3 O& g! P, z) D9 B6 a" W: Z
When you use the /CheckHealth argument, the DISM tool will report whether the image is healthy, repairable, or non-repairable. If the image is non-repairable, you should discard the image and start again. If the image is repairable, you can use the /RestoreHealth argument to repair the image.
1 k' t/ I$ N7 b) \" D
, c' M8 K0 o) j: M' |% a: UTo repair an image+ O4 N. u* x( y2 C& y
Use the /RestoreHealth argument to repair the image. For example, to repair an offline image using a mounted image as a repair source, at a command prompt, type the following command:
8 L& w4 k) H( w9 ]/ v5 U$ p( e" V
! Y8 ^; C' a. e- ~# v
Copy
% ~  o" F6 \6 H5 Z4 kDism /Image:C:\offline /Cleanup-Image /RestoreHealth /Source:c:\test\mount\windows
  h# C/ D9 |4 L# P- Z. JOr to repair an online image using some of your own sources instead of Windows Update, type:# X& s1 \, R4 T& m3 X: ^, T4 v
( P; b$ N& P1 y# v' G6 Z
- U: }  N! V2 o! Z
Copy) x. {6 Y4 v5 H& ~0 v- V7 Z: E
Dism /Online /Cleanup-Image /RestoreHealth /Source:c:\test\mount\windows /LimitAccess+ M- G, g. ~, F, b7 Y& }
If you do not specify a /Source for the repair files, the default location for Features on Demand is used. For more information, see Configure a Windows Repair Source. If you specify more than one /Source, the files are copied from the first location where they are found and the rest of the locations are ignored. You can use /LimitAccess to prevent the DISM tool from using Windows Update as a repair source or as a backup repair source for online images.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|华强北 电脑城 龙岗电子世界 龙华电脑城 pc4g.com ( 粤ICP备16039863号 )

GMT+8, 2024-9-14 17:42 , Processed in 0.164489 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表