DISM and SFC


  1. gfd
    Posts : 74
    Windows 10 Pro 2004 (19041.264)
       #1

    DISM and SFC


    Greetings,

    I am asking for some guidance regarding the above Windows features. I ask, knowing that perhaps there is no concrete answer to my question. Let me set it up.

    I was trying to unfreeze a friend's machine. It was his second machine and hadn't been used in months. He thought that Norton trashed a Windows Update, as that was when the machine froze. I did the F8 and got into the pre-boot environment. There were no restore points, so I went to startup repair. That got me into a functioning Windows state. Very sluggish, but functioning.

    First, I disabled Windows Update service temporarily. I created a restore point, did chkdsk - OK. Ran DISM /ScanHealth - OK. Ran SFC /Scannow - was unable to repair all files.

    I then Disabled Norton, re-enabled Windows Update and let the updates happen. Then I re-enabled Norton. Windows didn't feel right (I know that's subjective), so I reverted to the System Restore point I had created. After 8 hours, I figured it either was done without telling, or it had crashed. I restarted the computer and Automatic Startup repair kicked in. In hindsight, I wonder if Norton messed with the restore.

    ASR couldn't fix the machine. I booted into the installation media and opened repair. Startup Repair couldn't fix the computer. Tried the Restore point and the OS could not be found. I repaired the boot files and the OS was found but it wouldn't boot into the login screen.

    Thanks for staying with me. I just wanted to list the steps so you know how I got to the bad state. So...I opened the command prompt and attempted to run SFC /Scannow. It wouldn't run in the recovery environment. I then ran BCDedit and found the OS. I added the source option to SFC, but it couldn't initialize.

    Thinking it was a case of a bad image, I attempted to run DISM to repair the image. No way it was going to run. I'm sorry I can't remember each error; but every time I dealt with an error, a new one reared its ugly head.

    I finally got the restore point to work. It still took several hours in the pre-boot environment, but it worked. Windows was unstable, so I saved all data and did a clean install.

    So, yes there is a question or four :)
    -is there a correct (foolproof) way to run DISM and then SFC from the installation media, targeting the OS?
    -will DISM and SFC initialize if the registry is corrupt?
    -if DISM and SFC can be run from the installation media, what are their limitations in terms of what they can fix?
    -can DISM and SFC deal with a damaged registry?

    In hindsight, perhaps I should have waited out the first restore. But it seemed pointless after 8 hours. Still...

    Thanks so much in advance for your help,
    Graham
      My Computer


  2. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #2

    Graham,

    To run SFC from the installation media, use Option 1 of SFC-DISM - TenForumsTutorials

    When you boot from & then run SFC from the installation media, your normal OS is not running so its Registry is not loaded and it is ignored.
    A temporary OS set up by the installation media is running and it has its own temporary Registry.

    SFC is the System file checker. It checks some system files. It does not check any Registry.

    Denis
      My Computer


  3. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #3

    Hello @gfd,

    Another option that is available to you is . . .

     In-Place-Upgrade - Repair Install

    Information & Tutorials:

    This is a Non-Destructive Process which keeps ALL your Apps, Programs, and Personal Data etc Intact . . .

    IMPORTANT: This is an extract from the Tutorial below . . .

    • You will only be able to do a repair install of Windows 10 from within Windows 10. You will not be able to do a repair install at boot or in Safe Mode.
    • You will need at least around 10 GB + what Windows is currently using of free space available on the Windows drive.
    • The installation media (ex: ISO or USB) must be the same edition and same or newer build as your currently installed Windows 10. If it's not, then the repair install will fail.
    • The installation media (ex: ISO or USB) must be the same base language (aka: system default language) as your currently installed Windows 10. If it's not, then you will not keep anything.
    • If you have a 32-bit Windows 10, then you must use a 32-bit ISO or USB.
    • If you have a 64-bit Windows 10, then you must use a 64-bit ISO or USB.

    > How to Do a Repair Install of Windows 10 with an In-place Upgrade

    Basically . . .

    [1] Download the ISO to the Desktop.
    [2] Right-click the ISO > Mount.
    [3] Open File Explorer.
    [4] Double-click the Mounted Drive to open it.
    [5] Double-click setup.exe.
    [6] Choose the Upgrade option.
    [7] Select Change what to keep.
    [8] Select One of the following . . .

    • Keep Personal Files and Apps.
    • Keep Personal Files Only.
    • Nothing.

    [9] Unmount the ISO by right-clicking the Mounted Drive > Eject.

    The only downside is that you could POSSIBLY lose some of your personalizations.

    Recommendations:

    DISABLE:

    ANY Non-Microsoft . . .

    • Antivirus Software.
    • Firewall software.
    • Drive Encryption Software.



    I hope this helps.
      My Computer


  4. gfd
    Posts : 74
    Windows 10 Pro 2004 (19041.264)
    Thread Starter
       #4

    Thanks guys. From what I read, it seems SFC doesn't repair corrupt registry. It does make sense, given the repaired registry may not reflect the state of the machine.
      My Computer


  5. Posts : 23,253
    Win 10 Home ♦♦♦19045.4355 (x64) [22H2]
       #5

    gfd said:
    Thanks guys. From what I read, it seems SFC doesn't repair corrupt registry. It does make sense, given the repaired registry may not reflect the state of the machine.


    The In-Place Upgrade will fix everything that's Windows. That's it's purpose.
    After that...if there is anything else wrong...at least you know it's not Windows.
      My Computer


  6. gfd
    Posts : 74
    Windows 10 Pro 2004 (19041.264)
    Thread Starter
       #6

    Thanks Ghot
      My Computer


  7. Posts : 23,253
    Win 10 Home ♦♦♦19045.4355 (x64) [22H2]
       #7

    gfd said:
    Thanks Ghot




    Repair Install Windows 10 with an In-place Upgrade







    Here is the short version of the In-place upgrade tutorial...

    DISABLE non-Microsoft:
    a) antivirus software
    b) firewall software
    c) drive encryption software

    Make a full OS backup with a program like Macrium Reflect (free)
    Macrium Software | Macrium Reflect Free

    Go here and get the Media Creation Tool and save it to your desktop.
    https://www.microsoft.com/en-us/soft...load/windows10

    RUN the Media Creation Tool and use it to: Create an ISO image... save IT to your desktop.
    This will be the latest version of the ISO image.




    Right click the ISO image and choose: MOUNT
    Open File Explorer and you will see a new drive letter. It will look like a DVD optical drive.
    Double click the new drive letter to open it.
    Find setup.exe and double click it to start the in-place upgrade.

    Choose the Keep personal files and apps option.

    After it's all done... to UNmount the ISO image, right click the new drive letter and choose: EJECT.


    The ONLY thing you will lose is some of your personalizations. Your programs and data will be intact.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:07.
Find Us




Windows 10 Forums