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
|
|
![]() Still visually handicapped, new avatar (a camel) :0) ![]() ![]() ![]() ![]() ![]() ![]() Group: BC Advisor Posts: 16,689 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
|
|
![]() Still visually handicapped, new avatar (a camel) :0) ![]() ![]() ![]() ![]() ![]() ![]() Group: BC Advisor Posts: 16,689 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: 47 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
|
|
![]() Still visually handicapped, new avatar (a camel) :0) ![]() ![]() ![]() ![]() ![]() ![]() Group: BC Advisor Posts: 16,689 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
|
|
![]() Still visually handicapped, new avatar (a camel) :0) ![]() ![]() ![]() ![]() ![]() ![]() Group: BC Advisor Posts: 16,689 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 |
|
|
|
May 10 2008, 09:59 AM
Post
#7
|
|
![]() Still visually handicapped, new avatar (a camel) :0) ![]() ![]() ![]() ![]() ![]() ![]() Group: BC Advisor Posts: 16,689 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
#8
|
|
|
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
#9
|
|
![]() Computer Masochist ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 26,671 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 Do not send me PMs with problems that should be posted in the forums. Keep it in the forums, so everyone benefits Become a BleepingComputer fan: Facebook and Twitter |
|
|
|
Aug 30 2008, 12:35 AM
Post
#10
|
|
![]() Look buddy -- I'm an Engineer ![]() ![]() ![]() ![]() ![]() ![]() Group: HJT Team Coach Posts: 8,602 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 consider a donation (by clicking this link). And that means I solve problems. Not problems like "What is beauty?" .. 'cause that would fall under the purview of your conundrums of philosophy.... |
|
|
|
Dec 4 2008, 11:19 PM
Post
#11
|
|
|
New Member ![]() Group: Members Posts: 1 Joined: 3-December 08 Member No.: 264,706 |
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. Just a note to add that if you're using an Operating System disk from your computer's manufacturer, it likely will open a pop-up screen upon insertion, which asks what you want to do. Minimize it or wait for SFC's scan progress box to return to the forefront. Having used these disks with SFC on at least four different computers, I found that the disk required reinsertion a couple of times, apparently to allow SFC to get far enough into the files to locate useful ones. It hurts nothing to remove and reinsert the disk until SFC 'latches on' and proceeds normally. Remembering the first experience and wasted time, I wished someone had forewarned me about this! - cmstormer This post has been edited by cmstormer: Dec 4 2008, 11:43 PM |
|
|
|
Jan 10 2009, 04:54 PM
Post
#12
|
|
![]() Forum Regular ![]() ![]() ![]() Group: Members Posts: 280 Joined: 4-January 08 Member No.: 180,998 |
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 Um, wont this just create a folder on the root. ... C:\xpsp3 when we are trying to make the folder a sub-directory of the i386 folder (C:\i386\xpsp3) ?????? |
|
|
|
Feb 12 2009, 07:07 AM
Post
#13
|
|
![]() Visiting Alien ![]() ![]() ![]() ![]() ![]() ![]() Group: BC Advisor Posts: 9,354 Joined: 20-May 07 From: millenium falcon and rockytop Member No.: 131,963 |
C:\WINDOWS\ServicePackFiles\i386
After applying the admin install of SP3 for windows xp, I have a i386 folder with 561 MB and 2,949 files What was microsoft's intention here? -------------------- Chewy
|
|
|
|
May 7 2009, 08:34 AM
Post
#14
|
|
|
New Member ![]() Group: Members Posts: 11 Joined: 7-May 09 Member No.: 329,390 |
I ran the Sfc.exe file to try and recover windows files, however I am still missing many of them. I got a pretty bad virus and I'm not sure what the name of it is...I think it was one released in april...not sure, it has caused my task bar not to allow files to minize in it, my windows media player gives me a memory error, and my CD drive will not show up...Also windows scripting and system restore are messed up...I don't know how to fix it...I've tried registry cleaner things, I've tried virus scanning (Norton 360) never got anywhere. This may be the wrong board to be requesting help...but...I thought Sfc was supposed to tell you if windows files have been modified.
|
|
|
|
Jul 19 2009, 06:47 PM
Post
#15
|
|
![]() Look buddy -- I'm an Engineer ![]() ![]() ![]() ![]() ![]() ![]() Group: HJT Team Coach Posts: 8,602 Joined: 17-January 08 From: Northfield, Ohio Member No.: 184,215 |
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. http://billy-oneal.com/SFCDump.exe <-- Have fun -------------------- 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 consider a donation (by clicking this link). And that means I solve problems. Not problems like "What is beauty?" .. 'cause that would fall under the purview of your conundrums of philosophy.... |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 9th February 2010 - 03:26 PM |