0

I have started getting weird behaviour on my Windows 10 laptop, without really changing anything myself. For example, it's much slower, the start menu won't open and the powershell throws some error about PSReadline. I had a look in the event viewer and under system, it's all red with errors:

enter image description here

There are the 3 error which are most common:

1:

The State Repository Service service terminated with the following error: The system cannot find the file specified.

2:

The Tile Data model server service depends on the State Repository Service service which failed to start because of the following error: The system cannot find the file specified.

3:

DCOM got error "1068" attempting to start the service tiledatamodelsvc with arguments "Unavailable" in order to run the server: {B31118B2-1F49-48E5-B6F5-BC21CAEC56FB}

So it looks like it all starts with the State Repository Service not starting. I tried running it manually but get the following error:

Windows could not start the State Repository Service service on Local Computer.

Error 2: The system cannot find the file specified.

Looking at the registry entry, I have the following but can't tell if there's anything wrong:

enter image description here

I was able to find the Windows.StateRepository.dll in C:/Windows/System32/.

How can I get the State Repository Service running?

2 Answers 2

1

It looks like the 'parameters' and 'Security' keys are missing from the 'StateRepository' key in the registry.

Either restore the Service from a good, working SYSTEM registry hive, i.e. from another working Windows 10 version, export the service from HKLM\SYSTEM\ControlSet001\Services to a .reg file, and then merge it into your registry... or you can create the keys and enter the details manually.

enter image description here

0

1st Solution

The following should resolve the issue and must be completed in the order listed.

Issue the following in an admin terminal:

  1. Cleanup the Component Store (%WinDir%\WinSxS):

    DISM /Online /Cleanup-Image /StartComponentCleanup
    
  2. Check for and fix corruption within the Component Store, then Reboot once completed:

    DISM /Online /Cleanup-Image /RestoreHealth
    
    • This verifies the backups of all system files against known good copies from the Windows Update servers, so an internet connection is required.
    • If an internet connection cannot be obtained, you will need to use the Windows install ISO's install.wim or install.esd:

      1. Get the Image Index for the Windows install from the install.wim/install.esd

        DISM /Get-Wiminfo /WimFile:"Z:\sources\install.wim"
        
      2. Use this in place of #2's command, then Reboot once completed:

        DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:"z:\sources\install.esd":<index#>
        
  3. Check for and fix system file corruption, then Reboot once completed:

    SFC /ScanNow
    

2nd Solution

You can also restore a registry hive from the auto-created backup in %WinDir%\System32\config\RegBack

  • Note: A recent Windows 10 update disabled the auto-backup of hives and can be re-enabled via:

    Reg Add "HKLM\System\CurrentControlSet\Control\Session Manager\Configuration Manager" /v EnablePeriodicBackup /t REG_DWORD /d 1 /f
    

3rd Solution

Should neither of the above work, you can perform a repair install of Windows, which will keep all installed applications and data:

  1. Download the Windows install ISO
  2. Extract the ISO's contents to a folder on a drive other than C:\
  3. While booted to Windows, run the Windows Install ISO's Setup.exe
    • Select SKIP if the Product Key is requested
    • Select to keep Settings/Files

This option should only be used if DISM and SFC [above] are unable to repair the corruption.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .