Welcome Guest ( Log In | Click here to Register a free account now! )
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.![]() ![]() |
Feb 2 2006, 05:35 PM
Post
#1
|
|
![]() Visually handicapped, hence the avatar :0) ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 13,887 Joined: 2-October 05 From: Southeastern CT, USA Member No.: 35,824 |
How to Use SFC.EXE to Repair System Files Guide Overview The purpose of this guide is to teach you how to use the System File Checker (SFC) to examine and repair corrupt operating system files. In doing this, the SFC tool may replace some of your files that were updated by Windows Update. The only way to check this (and to update any of the files) is by visiting Windows Update and allowing it to check your system for updates and update as needed. References Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe) Microsoft Windows XP - Repair overview (Link doesn't work as of 06 Aug 2008) This link discusses the repair options: http://www.microsoft.com/windowsxp/using/s...rt/nostart.mspx Instructions
This post has been edited by usasma: Aug 6 2008, 02:51 PM
Reason for edit: added [b]BOLD[/b]
-------------------- - John
**If you need a more detailed explanation, please ask for it. I have the Knack. ** |
|
|
|
Oct 5 2006, 08:14 AM
Post
#2
|
|
![]() Visually handicapped, hence the avatar :0) ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 13,887 Joined: 2-October 05 From: Southeastern CT, USA Member No.: 35,824 |
There have been some issues with running SFC.EXE /SCANNOW that this article doesn't address. They are:
1) The system won't accept the original installation disk because it doesn't have Service Pack 2 on it. 2) You don't have a Windows installation CD - only a restore CD from the manufacturer. Here's how to deal with them: __________________________________________________________________________ To fix the SP2 issue, you'll have to "slipstream" SP2 along with your installation CD. Rather than going through all the gory details here, just visit this link: http://www.winsupersite.com/showcase/windo..._slipstream.asp It provides a detailed explanation of how to slipstream SP2 along with your Windows installation CD. __________________________________________________________________________ To fix the problem when you only have a restore CD you'll have to search for a folder on your hard drive (or on the restore CD) that's named "i386" (without the quotes). Once you find that, copy it to your hard drive at the root (C:\i386). Make sure that the directory is located at the root of your C: drive (C:\i386) - if not, then you'll need to change the path to the proper entry in the registry edit. Then perform this registry edit to point SFC.EXE at it: So, the first step is to backup your registry. The easy way to do this is to set a System Restore point ( http://www.microsoft.com/windowsxp/using/h...temrestore.mspx ) Next, go to Start...Run...and type in "regedit.exe" (without the quotes) and press enter. You'll see a folder-like view on the left, and entries on the right. Navigate down the folder view on the left to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\ CurrentVersion\Setup Just click on the + sign to expand the view of the next level - so, to start, you'll click on the + next to HKEY_LOCAL_MACHINE and look for the SOFTWARE entry. Then you'll click on the + next to SOFTWARE and look for Microsoft, and so on until you get to the Setup key. Then just click once on the Setup key. Look in the right hand pane and double click on the entry that says "SourcePath". In the box that pops up, type in "C:\" (without the quotes) and press Enter. Then close regedit and reboot your computer. SFC.EXE /SCANNOW should now run without problems for you. ___________________________________________________________________________ If you're unable to find the i386 folder, it may be that it's on a hidden partition on your hard drive or that the restore CD has been created in a different way and you can't view the directories. If so, there's a couple of more things to try (please post your question in the forums) or you can look to see if your system has a repair or a non-destructive recovery option. This option will leave your programs and data intact while replacing all of the Windows files. This is also the next step if SFC.EXE /SCANNOW doesn't fix the problem. This post has been edited by usasma: Oct 5 2006, 08:15 AM -------------------- - John
**If you need a more detailed explanation, please ask for it. I have the Knack. ** |
|
|
|
Oct 7 2006, 10:53 AM
Post
#3
|
|
|
Member ![]() ![]() Group: Members Posts: 46 Joined: 4-January 05 Member No.: 8,591 |
I followe this instructions:
Next, go to Start...Run...and type in "regedit.exe" (without the quotes) and press enter. You'll see a folder-like view on the left, and entries on the right. Navigate down the folder view on the left to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\ CurrentVersion\Setup Just click on the + sign to expand the view of the next level - so, to start, you'll click on the + next to HKEY_LOCAL_MACHINE and look for the SOFTWARE entry. Then you'll click on the + next to SOFTWARE and look for Microsoft, and so on until you get to the Setup key. Then just click once on the Setup key. Look in the right hand pane and double click on the entry that says "SourcePath". In the box that pops up, type in "C:\" (without the quotes) and press Enter. Then close regedit and reboot your computer. SFC.EXE /SCANNOW should now run without problems for you. BUT IT DID NOT FIX THE PROBLEM. IS THERE ANYTHING ELSE I CAN DO ? |
|
|
|
Dec 8 2006, 09:18 AM
Post
#4
|
|
![]() Visually handicapped, hence the avatar :0) ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 13,887 Joined: 2-October 05 From: Southeastern CT, USA Member No.: 35,824 |
Hi Lucas!
This is the first time that I've looked back at my mini-guide on using SFC.EXE and just noticed your post from Oct 7. My apologies for not seeing this sooner, but the mini-guide forum isn't routinely monitored. If you're still experiencing problems, please post your problem at: http://www.bleepingcomputer.com/forums/ind...hp?showforum=56 - John -------------------- - John
**If you need a more detailed explanation, please ask for it. I have the Knack. ** |
|
|
|
Apr 1 2007, 07:14 AM
Post
#5
|
|
![]() Visually handicapped, hence the avatar :0) ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 13,887 Joined: 2-October 05 From: Southeastern CT, USA Member No.: 35,824 |
SFC.EXE uses the C:\Windows\system32\dllcache folder to replace changed files. It also uses a log file that I haven't been able to locate (although there should be entries in the Event Viewer that describes each change). EDIT: Here's how to analyze the logfiles in Vista: http://support.microsoft.com/kb/928228
There's (according to Microsoft) approximately 2,700 files that are protected. On my XP installation there's 2,511 files in the dllcache folder (so I'm missing almost 200). (see Post #8 for the list for SP3 - 3588 files). Previously I've been of the opinion that explorer.exe wasn't protected - this ISN'T the case. It is protected. SFC.EXE also protects the drivers contained in the drivers.cab file - but it should do this silently - but I'll need to do more research on it. Optimizing Windows File Protection Service: http://support.microsoft.com/kb/229656 This post has been edited by usasma: May 10 2008, 10:02 AM -------------------- - John
**If you need a more detailed explanation, please ask for it. I have the Knack. ** |
|
|
|
Dec 16 2007, 01:07 PM
Post
#6
|
|
|
New Member ![]() Group: Members Posts: 3 Joined: 24-November 04 Member No.: 5,818 |
but i have a question what happen when you what to use sfc /scannow, and go to registry to change seting there so you do not need the xp cd any more
but find out on how to do it, ther is no SourcePath lisyted in registy i have use sfc /scannow for a long time, with a home xp cd before sp1,, but i got a new compter with xp home sp2 cd,, and SourcePath is not there |
|
|
|
Mar 17 2008, 04:14 AM
Post
#7
|
|
![]() Forum Member ![]() Group: Banned Posts: 1,614 Joined: 20-September 07 Member No.: 157,913 |
Hi, just thought I would mention this is a very good tutorial on how to use SFC. Well done usasma!
PS: I might also add that if you type in "How to use SFC" in Google, it is the second result! Regards, David. |
|
|
|
May 10 2008, 09:59 AM
Post
#8
|
|
![]() Visually handicapped, hence the avatar :0) ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 13,887 Joined: 2-October 05 From: Southeastern CT, USA Member No.: 35,824 |
Just a bit more info. I found out from Windows Internals, 4th Edition that the sfcfiles.dll file has the list of files that SFC.EXE scans for (you can view it with the Strings utility from SysInternals - but will have to pipe it to a text file because the output quickly overflows the available buffers in cmd.exe).
In my slightly customized Virtual Machine with SP3 installed, the list of files totals 3585 (changed from Post #5). This is after subtracting all the duplicates (about 4 for each file) and the "gibberish" that I didn't understand. So, it's safe to say that SFC.EXE scans at least 3585 files when it's working. Most of the files are .dll's, and most are located in the System32 sub-directory - but there's a lot that don't fit this rule. BTW - this file doesn't seem to exist in Vista - so it'll take some more research on my part to figure out where it is now. This post has been edited by usasma: May 10 2008, 10:15 AM
Reason for edit: added Vista info
-------------------- - John
**If you need a more detailed explanation, please ask for it. I have the Knack. ** |
|
|
|
Aug 27 2008, 09:28 AM
Post
#9
|
|
|
New Member ![]() Group: Members Posts: 2 Joined: 13-August 08 Member No.: 229,582 |
QUOTE There's (according to Microsoft) approximately 2,700 files that are protected. On my XP installation there's 2,511 files in the dllcache folder (so I'm missing almost 200). (see Post #8 for the list for SP3 - 3588 files). I run XP Pro sp2 and in my dllcache folder, there are 2953 files. That's quite a bit above the 2700 you stated. I wonder why I have so many extras... |
|
|
|
Aug 27 2008, 05:51 PM
Post
#10
|
|
![]() Computer Masochist ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 7,263 Joined: 27-January 07 From: Cleveland, Ohio Member No.: 108,618 |
QUOTE I run XP Pro sp2 and in my dllcache folder, there are 2953 files. That's quite a bit above the 2700 you stated. I wonder why I have so many extras... It's been a year since that statement. With updates and SP3 it's now more QUOTE with SP3 installed, the list of files totals 3585
-------------------- Mark
why won't my laptop work? Having grandkids is God's way of giving you a 2nd chance because you were too busy working your butt off the 1st time around Avatar by Handplane |
|
|
|
Aug 30 2008, 12:35 AM
Post
#11
|
|
|
Multi Megaton Malware Munition ![]() ![]() ![]() ![]() ![]() ![]() Group: HJT Team Posts: 3,934 Joined: 17-January 08 From: Northfield, Ohio Member No.: 184,215 |
Hello, all
If you run Windows XP SFC and it asks for your "Service Pack 3 Disk", you can extract the service pack 3 files as follows: Download the standalone windows XP SP3 package from here: http://www.microsoft.com/downloads/details...;displaylang=en and save it to your desktop. Then extract the files from the package by going to Start -> Run and entering: CODE "%userprofile%\Desktop\WindowsXP-KB936929-SP3-x86-ENU.exe" -x:C:\xpsp3 This will place the service pack 3 updates to the i386 folder into your C drive under the folder "xpsp3". You should then be able to point SFC at this folder for the files it can't find from your windows disk or i386 folder. Hope that helps, Billy3 -------------------- The forum is always a busy place. In the event I fail to reply within twenty-four hours, feel free to send me a PM.
Have I helped you? If so, please say so in My Guestbook. ![]() |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 10th October 2008 - 02:28 PM |