4

I am a new member and this error is troubling me. When I try and download .NET framework 4.6.2 it says my component store is corrupt. I did some research and came up with the solution in command prompt (administrator) DISM.exe /Online /Cleanup-image /Restorehealth. I ran this command and now it tells me that error: 3 "The system cannot find the path specified"

I have been trying to figure it out and fix it but can't get anywhere, any suggestions?

3 Answers3

1

Windows Update, which OptionalFeatures uses, depends on the Component Store [%WinDir%\WinSxS] (as does Dism and Sfc), since it maintains backup copies of all system files (additional info).

To resolve:

  1. Open an Admin terminal: WinKey+ROpen: powershellCtrl+Shift+OK

  2. /StartComponentCleanup: Clean the Component Store of any broken hard links
    # Online [booted Windows image]:
      Dism /Online /Cleanup-Image /StartComponentCleanup
    

    Offline [non-booted Windows image]:

    Dism /Image:"Z:\Windows" /Cleanup-Image /StartComponentCleanup

    Cmdlet:
    # Online:
      Repair-WindowsImage -Online -StartComponentCleanup
    
    # Offline:
      Repair-WindowsImage -Path "Z:\Windows" -StartComponentCleanup
    

  3. /RestoreHealth: Verify and fix any corruption within the Component Store
    (Requires an internet connection, else the offline method will be required)
    # Online [booted Windows image]:
      Dism /Online /Cleanup-Image /RestoreHealth
    

    Offline [non-booted Windows image]:

    Dism /Image:"Z:\Windows" /Cleanup-Image /RestoreHealth

    Cmdlet:
    # Online:
      Repair-WindowsImage -Online -RestoreHealth
    
    # Offline:
      Repair-WindowsImage -Path "Z:\Windows" -RestoreHealth
    
    • Offline Method:
      Use the install.<esd|wim> from the Windows Install ISO for the installed version:
      1. Create Windows <#> installation mediaDownload tool nowinstall on another PC
      2. Mount ISO to determine installed OS index [image] from its install.<esd|wim>:
        Dism /Get-ImageInfo /ImageFile:"Y:\sources\install.<esd|wim>"
        
        Cmdlet:
        Get-WindowsImage -ImagePath "Y:\sources\install.<esd|wim>"
        
      3. Specify index number at the end of the /Source parameter:
        # Online [booted Windows image]:
         # ESD:
           Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:"Y:\sources\install.esd":6 /LimitAccess
        

        WIM:

        Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:"Y:\sources\install.wim":6 /LimitAccess

        Offline [non-booted Windows image]:

        Dism /Image:"Z:\Windows" /Cleanup-Image /RestoreHealth /Source:esd:"Y:\sources\install.esd":6 /LimitAccess

        Cmdlet:
        # Requires mounting ESD/WIM first:
        
          # Determine a partition to mount on:
            Gdr -PSProvider 'FileSystem'
        
          # Create Mount directory and mount ESD/WIM index:
            MkDir "C:\Mount\Windows"
        
          # If ESD, export to WIM first, as ESDs can't be mounted:
            MkDir "C:\sources"; Export-WindowsImage -SourceImagePath "Y:\sources\install.esd" -SourceIndex 6 -DestinationImagePath "C:\sources\install.wim" -CheckIntegrity -Compression Fast
        
          # Mount WIM:
            # Exported:
              Mount-WindowsImage -ImagePath "C:\sources\install.wim" -Index 1 -Path "C:\Mount" -ReadOnly
        
            # ISO:
              Mount-WindowsImage -ImagePath "Y:\sources\install.wim" -Index 6 -Path "C:\Mount" -ReadOnly
        
          # Either Source can be used: Mount\Windows || Mount\Windows\WinSxS
            Repair-WindowsImage -Image "Z:\Windows" -RestoreHealth -Source "C:\Mount\Windows"
        

        Export-WindowsImage | Gdr | MkDir | Mount-WindowsImage

  4. Reboot; if errors are found, review from the bottom up:
    (Log files are easier to read and sift through via the Log syntax in VS Code)
    %WinDir%\Logs\DISM\dism.log
    

  5. /ScanNow: Verify no corruption exists within system files
    # Online [booted Windows image]:
      Sfc /ScanNow
    

    Offline [non-booted Windows image / booted to WinPE/WinRE]:

    Sfc /ScanNow /OffBootDir=Z:\ /OffWinDir=Z:\Windows

    C: is usually not the drive letter in WinPE/WinRE

    To ascertain: DiskPart → lis vol → exit


  6. Reboot; if errors are found, output to SFCdetails.log and review:
    FindStr /c:"[SR]" "$env:WinDir\Logs\CBS\CBS.log" > "$env:UserProfile\Desktop\SFCdetails.log"
    

    Non-PowerShell:

    FindStr /c:"[SR]" "%WinDir%\Logs\CBS\CBS.log" > "%UserProfile%\Desktop\SFCdetails.log"


  7. Retry installing the Optional Feature
JW0914
  • 9,096
0

I ran into the same problem:

E:\sources> DISM /APPLY-IMAGE /IMAGEFILE:E:\sources\INSTALL.WIM /INDEX:6 /APPLYDIR:K:

Deployment Image Servicing and Management tool Version: 10.0.22621.1

Error: 3

The system cannot find the path specified.

The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

and I could not understand the problem because both e:\sources\INSTALL.WIM and f:\ exit.

So I followed the advice given by majorgeeks.com:

dism.exe /online /Cleanup-Image /StartComponentCleanup

With that I saw what the real problem is: my %TEMP% and %TMP% drive is set to a hard drive that I just pulled out of the system. Strangely enough, when I try to recreate the problem by setting the environment variables TEMP and TMP to an non existing drive letter, I can still get error 3 but somehow dism.exe /online /Cleanup-Image /StartComponentCleanup no longer show any error.

tst
  • 211
-1

Use the windows install media and run 'setup.exe' - it's much easier then fiddling around with DISM commands.

Let it do an in-place upgrade of your computer (make sure the setting for keep files is selected).

David Shader
  • 301
  • 2
  • 11