none
System File Checker (SFC) in Windows 7

    Question

  • System File Checker in Windows 7 should use install disk for repairs, not what is stored on HDD.

    If files in "store" are corrupt, no repairs can be made.

    There should be a "switch" with sfc to use the install disk.

    When you run sfc in XP, you have to put the install disk in the drive.

    Reinstalling the operating system is a big job, that could be avoided with this "switch" for W7.

    WHY NOT !!!!!!


    Tuesday, June 21, 2011 12:47 AM

Answers

  • Hi,

    Thanks for the post.

    This is by design. The method is already changed in Windows 7.

    If you find have any inconveniences or suggestions, please submit your feedback to our Product Feedback Team : http://mymfe.microsoft.com/Windows%20%207/Feedback.aspx?formID=195


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
    Thursday, June 23, 2011 10:14 AM
    Moderator
  • The /offwindir /offbootdir flags are used to repair an offline Windows installation. For example, if the operating system cannot start because some files are damaged, you can boot your computer into Recovery Environment (RE) using the Windows 7 DVD and run the Sfc.exe command against your damaged (and offline) Windows installation.

    If you want to "extract" a system file from the Windows 7 DVD, you can use the Imagex /mount command to mount the <DVD>:\sources\install.wim file on an empty folder and copy the file from that folder to your damaged system.

    Here's the detailed procedure with the GlobalInstallOrder.xml file as an example:

    http://support.microsoft.com/kb/942968


    Microsoft MVP Windows Expert Consumer | http://www.wintecnico.com

    Tuesday, June 28, 2011 9:51 AM
    Answerer
  • Hello,

    It does not prompt for media for file replacement, If the files are not in the cache they must be manually replaced, see the link from Daniel Martin in the article he points to for the reference for how to get those files.

    There are a limited set of cached files, the rest must be manually replaced if they are corrupted or missing, the fact that SFC doesn't run indicates a completly different problem.  SFC probably will not run due to there are updates in the process of installing.

    Those updates either need to complete their installation or be uninstalled, or removed/.


    Thanks, Darrell Gorter [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. VAMT - Volume Activation Management Tool - Download link http://www.microsoft.com/downloads/details.aspx?FamilyID=ec7156d2-2864-49ee-bfcb-777b898ad582&displaylang=en
    Wednesday, June 29, 2011 1:09 AM
  • Hello BobK11110,

    The wim filter driver is included with Windows 7 so the Windows AIK is not needed, otherwise you have it correct.

     


    Thanks, Darrell Gorter [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. VAMT - Volume Activation Management Tool - Download link http://www.microsoft.com/downloads/details.aspx?FamilyID=ec7156d2-2864-49ee-bfcb-777b898ad582&displaylang=en
    • Marked as answer by BobK1110 Monday, July 04, 2011 9:15 PM
    Monday, July 04, 2011 4:35 AM

All replies

  • Hi,

    Thanks for the post.

    This is by design. The method is already changed in Windows 7.

    If you find have any inconveniences or suggestions, please submit your feedback to our Product Feedback Team : http://mymfe.microsoft.com/Windows%20%207/Feedback.aspx?formID=195


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
    Thursday, June 23, 2011 10:14 AM
    Moderator
  • Hi,

    Thanks for the reply.

    Does this mean there is a way to use the install disk with SFC in Windows 7?

    Can the offbootdir or offwindir switch use the install disk?

    I tried - SFC /scannow /offbootdir=d:\ /offwindir=(with different directories).

    All I get is "Windows Resource Protection could not start the repair service".

    What does "The  method is already changed in Windows 7" mean?

    Is there a new version of SFC with more switches?

    Is there a program available from Microsoft to use the install disk?

    Can the install disk itself be used to run SFC and make repairs using the files from the disk.

    If I can not solve this problem, I will have to live with some problems. Reinstall is unacceptable.

    Thanks for any help you can give me.

     

    Sunday, June 26, 2011 1:02 AM
  • Hello BobK1110,

    If the file is not in the cache and the cache only contains boot-critical files, the file must be replaced manually.

    There is no access to the media to get files, this was not changed in Windows 7.


    Thanks, Darrell Gorter [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. VAMT - Volume Activation Management Tool - Download link http://www.microsoft.com/downloads/details.aspx?FamilyID=ec7156d2-2864-49ee-bfcb-777b898ad582&displaylang=en
    Sunday, June 26, 2011 10:25 PM
  • So...does this mean we can't fix certain problems with SFC?  Because Windows Updater is screwed up on my machine (won't install IE9, keeps reinstalling already downloaded updates, doesn't show any update history etc.) and I attempted to use SFC to fix the issue as recommended http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/inplace-upgrade-fails-to-run-installation/32306605-2474-e011-8dfc-68b599b31bf5.

     

    Sfc gives me the same error at the very start and refuses to run...so there's no way to fix this without a full reinstall?

    Monday, June 27, 2011 10:08 PM
  • Unfortunately though it hasn't ever asked for a DVD in order to get the undamaged files.  Even using the off<win/boot>dir commands it's unresponsive saying:

     

    "C:\Windows\system32>sfc /scannow

    Beginning system scan.  This process will take some time.


    Windows Resource Protection could not perform the requested operation.

    C:\Windows\system32>"

    Tuesday, June 28, 2011 12:14 AM
  • The /offwindir /offbootdir flags are used to repair an offline Windows installation. For example, if the operating system cannot start because some files are damaged, you can boot your computer into Recovery Environment (RE) using the Windows 7 DVD and run the Sfc.exe command against your damaged (and offline) Windows installation.

    If you want to "extract" a system file from the Windows 7 DVD, you can use the Imagex /mount command to mount the <DVD>:\sources\install.wim file on an empty folder and copy the file from that folder to your damaged system.

    Here's the detailed procedure with the GlobalInstallOrder.xml file as an example:

    http://support.microsoft.com/kb/942968


    Microsoft MVP Windows Expert Consumer | http://www.wintecnico.com

    Tuesday, June 28, 2011 9:51 AM
    Answerer
  • Hello,

    It does not prompt for media for file replacement, If the files are not in the cache they must be manually replaced, see the link from Daniel Martin in the article he points to for the reference for how to get those files.

    There are a limited set of cached files, the rest must be manually replaced if they are corrupted or missing, the fact that SFC doesn't run indicates a completly different problem.  SFC probably will not run due to there are updates in the process of installing.

    Those updates either need to complete their installation or be uninstalled, or removed/.


    Thanks, Darrell Gorter [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. VAMT - Volume Activation Management Tool - Download link http://www.microsoft.com/downloads/details.aspx?FamilyID=ec7156d2-2864-49ee-bfcb-777b898ad582&displaylang=en
    Wednesday, June 29, 2011 1:09 AM
  • It appears as though the only way to replace corrupt or missing files short of reinstalling is:

    Download the Windows Automated Installation Kit (1.7gb) image file.

    Burn a DVD with the image file and install.

    Also download AIK instructions.

    Run SFC /scannow and look in the CBS log for the files that need replacing.

    Follow the instructions and replace the files one at a time.

    Example for replacing the GlobalInstallOrder.xml file:

    To resolve this problem, replace the corrupted GlobalInstallOrder.xml file on the system with the same file from the Windows Vista installation media. To do this, follow these steps:

    1.    Obtain the WIM filter driver from the Windows Automated Installation Kit (Windows AIK). To download and install the Windows AIK, visit the following Microsoft Web site:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=c7d4bc6d-15f3-4284-9123-679830d629f2&DisplayLang=en (http://www.microsoft.com/downloads/details.aspx?FamilyID=c7d4bc6d-15f3-4284-9123-679830d629f2&DisplayLang=en)

    2.    Click Start, point to All Programs, click Microsoft Windows AIK, right-click Windows PE Tools Command Prompt, and then click Run as administrator.

    If you are prompted for an administrator password, type the password. If you are prompted to continue, click Continue.

    3.    At the command prompt, type the following command, and then press ENTER.

    MD c:\Mount

    This command creates a folder that is named Mount.

    4.    Put the Windows Vista installation media in the CD or DVD drive.

    5.    At the command prompt, type the following command, and then press ENTER:

    Imagex /mount <var>DVDDriveLetter</var>\sources\install.wim 1 \mount

    6.    At the command prompt, type the following command, and then press ENTER:

    CD\mount\Windows\winsxs\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.0.6000.16386_none_07289f4cca5f6990

    This command moves to the source folder

    7.    At the command prompt, type the following command, and then press ENTER:

    xcopy GlobalInstallOrder.xml %windir%\winsxs\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.0.6000.16386_none_07289f4cca5f6990

    This command copies the GlobalInstallOrder.xml file to the destination folder.

    This example is for Vista, should work for Windows 7 ???

    If I am on the right or wrong path, let me know.

    I do not think Microsoft has addressed the issue properly, I still think the SFC program should have an option to use the installation disk to make repairs. It will NOT ever ask for the installation disk !!!

    Sunday, July 03, 2011 3:16 PM
  • Hello BobK11110,

    The wim filter driver is included with Windows 7 so the Windows AIK is not needed, otherwise you have it correct.

     


    Thanks, Darrell Gorter [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. VAMT - Volume Activation Management Tool - Download link http://www.microsoft.com/downloads/details.aspx?FamilyID=ec7156d2-2864-49ee-bfcb-777b898ad582&displaylang=en
    • Marked as answer by BobK1110 Monday, July 04, 2011 9:15 PM
    Monday, July 04, 2011 4:35 AM
  • Hi Darrell,

    Thanks for the conformation.

    In the example file replacement above, step 5 refers to "install.wim 1", where 1 is one of four folders.

    I looked in "install.wim" with 7zip to see this.   Is each folder for a different version of W7?

    Which folder number is for W7 Pro x64?   All four appear to contain almost the same thing.

    And for benefit of everyone who views this, what are the other folders for?

    When I tried step 5, I received a message: 'imagex' is not recognized as an internal or external command, operable program or batch file.  I tried image and imagex /? with same message.   What do I use in W7 to mount "install.wim"?  Or can I use 7zip to extract what I need and accomplish the same thing?

    I would like to get the folder or folders from install.wim I need for my OS and put them on a DVD for easier access.  

     

     

    Monday, July 04, 2011 11:15 PM
  • Hello BobK1110,

    Sorry, DISM is the command included with Windows 7 that is used to mount the wim file

    I should have read the article more closely, or rather I should get a new one generated.

    C:\>dism /mount-wim /?                                                                                                                                       
    Deployment Image Servicing and Management tool                                
    Version: 6.1.7600.16385              
                                                                                                                                                                                                          
    /Mount-Wim /WimFile:<path_to_WIM_file>                                          
    {/Index:<image_index> | /Name:<image_name>}                                   
    /MountDir:<target_mount_directory> [/readonly]                                                                                                               
    Mounts the WIM file to the specified directory so that it is available for    
    servicing. /ReadOnly sets the mounted image with read-only permissions.                                                                                        
    Examples:                                                                       
    DISM.exe /Mount-Wim /WimFile:C:\test\images\myimage.wim /index:1                
    /MountDir:C:\test\offline                                                                                                                                  
    DISM.exe /Mount-Wim /WimFile:C:\test\images\myimage.wim /index:1                
    /MountDir:C:\test\offline /ReadOnly                                                                                                                     


    Thanks, Darrell Gorter [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. VAMT - Volume Activation Management Tool - Download link http://www.microsoft.com/downloads/details.aspx?FamilyID=ec7156d2-2864-49ee-bfcb-777b898ad582&displaylang=en
    Tuesday, July 05, 2011 1:10 AM
  • Hi Darrell,

    Thanks for the DISM command info.

    Since I already made a folder called "mount", I used it and entered the following command:

    c:\dism  /mount-wim /wimfile:d:\sources\install.wim /index:3 /mountdir:c:\mount /readonly

    Mounted OK.  It took a few minutes and everything I need is now available.

    The size of the folder is 11gb.   I copied it to a external HD.  I also made a DVD-DL with the

    c:\windows\winsxs folder(the location of the files I need). Folder size is 5.6gb.

    You can use 7zip to extract these files.   Choose the correct folder 1,2,3 or 4.

    Thanks for your invaluable help.   Now to get the word out to everyone who needs it.

    P.S. Index number 1=Basic, 2=Home Premium, 3=Professional and 4=Ultimate 


    Wednesday, July 06, 2011 12:19 AM
  • ...the fact that SFC doesn't run indicates a completly different problem.  SFC probably will not run due to there are updates in the process of installing.

    Those updates either need to complete their installation or be uninstalled, or removed/.

    So how would I go about doing that if Windows Update seems to be on the fritz?  That's the main reason I'm trying to use sfc /scannow because I can't install IE9 and it's constantly telling me that certain updates are available and need to be installed but then it errors out during the installation.
    Wednesday, July 13, 2011 3:07 PM
  • ... the fact that SFC doesn't run indicates a completly different problem.  SFC probably will not run due to there are updates in the process of installing.

    Those updates either need to complete their installation or be uninstalled, or removed.

    Sorry...I replied to a previous post:

    So how would I go about doing that if Windows Update seems to be on the fritz?  That's the main reason I'm trying to use sfc /scannow because I can't install IE9 and it's constantly telling me that certain updates are available and need to be installed but then it errors out during the installation.

    Wednesday, July 13, 2011 3:09 PM
  • Hello,

    If SFC doesn't run, it probably means store corruption.

     

    Sfc reads the data it needs to do the validation from the registry and from the manifest files in the winsxs folder, if it cannot get the information it needs to do the validation of the OS it cannot run.  Usually this is indicative of problems with the registry or with the manifest files in the winsxs.  This tells it what the correct file and file versions are expected to be installed and where they are located inside the OS as well as whether they are cached. 

    If SFC is failing this is indicative of corruption somewhere in those files or registry that SFC cannot handle, normally it's better to attempt to rebuild as there is no good way to get the system back to a known good state.


    Thanks, Darrell Gorter [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. VAMT - Volume Activation Management Tool - Download link http://www.microsoft.com/downloads/details.aspx?FamilyID=ec7156d2-2864-49ee-bfcb-777b898ad582&displaylang=en
    Friday, July 15, 2011 12:43 AM
  • Hi Guys,

    I'm not a genius but trying something else,

    my Windows 7 ultimate was screwed after trying to install updates. Obviously i haven't set up any restore point. :-)

    I've tried and i'm still trying the SFC in a different way expecting a quick result.

    i have installed windows 7 ultimate on another HDD (same laptop) and try to use the SFC against the corrupted windows (E:\)

    I had this nice reply from the system because the corrupted one is on X64 and the one i'm running now is X32...

     

    C:\Windows\system32>SFC /scannow /offbootdir=e:\ /offwindir=e:\windows

    Beginning system scan.  This process will take some time.


    The offline image has a different platform architecture than the running system.

    This is not supported for system repair.

    C:\Windows\system32>

    Is there anything i can do to fix it that way without having to reinstall the full OS? or is it possible to copy replace boot files without using IMAGEX....

     

    Thanks

     

    Manu


    Monday, August 08, 2011 10:20 AM
  • "Manu Ok" wrote in message news:a33939e0-1fc9-49d9-9484-590b6448f3a2...

    Hi Guys,

    I'm not a genius but trying something else,

    my Windows 7 ultimate was screwed after trying to install updates. Obviously i haven't set up any restore point. :-)

    I've tried and i'm still trying the SFC in a different way expecting a quick result.

    i have installed windows 7 ultimate on another HDD (same laptop) and try to use the SFC against the corrupted windows (E:\)

    I had this nice reply from the system because the corrupted one is on X64 and the one i'm running now is X32...

     

    C:\Windows\system32>SFC /scannow /offbootdir=e:\ /offwindir=e:\windows

    Beginning system scan.  This process will take some time.


    The offline image has a different platform architecture than the running system.

    This is not supported for system repair.

    C:\Windows\system32>

    Is there anything i can do to fix it that way without having to reinstall the full OS? or is it possible to copy replace boot files without using IMAGEX....

     

    Thanks

     

    Manu


     
     
    Boot with your x64 disk and use the Repair option rather than the Install – then go to Advanced Repair (the CMD prompt) – you can then use the offline SC from there.
     

    Noel Paton | Nil Carborundum Illegitemi | CrashFixPC | The Three-toed Sloth
    Monday, August 08, 2011 11:19 AM