0

Since last November a permission-denied problem with 0x80070005 has been plaguing my PC. The problem occurs when:

  • Installing/updating an app in Microsoft Store.

    If I search for an app that failed to install by running Get-AppxPackage <Name>, the package that failed to install will be listed, but installation status is "staged"

    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    instead of "installed"

    PackageUserInformation : {S-1-5-21-4101337116-MyUserID-******* [MyUserName]: Installed}

    The app will be properly installed if it's correctly registered. So I can counter this problem by running the following PowerShell script whenever an error (event ID: 2008) is logged in Microsoft-Windows-Store/Operational (with one-minute delay to make sure all updates are downloaded):

    $AllApps = Get-AppxPackage -allusers *#
    
    foreach($UWPapp in $AllApps) {
    
        if(-Not $uselessapps.Contains($UWPapp.Name))    {
    # $uselessapps is a list of bloatwares like Cortana and so on
    
            if($UWPapp.PackageUserInformation -like "*Staged*") {
    
                Write-Output "refreshing $($UWPapp.PackageFullName)"
    
                Add-AppxPackage -DisableDevelopmentMode -Register "$($UWPapp.InstallLocation)\AppXManifest.xml" -Erroraction 'silentlycontinue'
    
                if(-Not $?) {
    
                     if ($Error[0] -like "*0x80073D06*") {
    
                        Write-Output "This package is outdated, removing ..."
    
                        Remove-AppxPackage -all -package $UWPapp.PackageFullName
    
                     }
    
                Write-Host "`n"
    
                }
    
            }
    
        }
    
    }
    
  • Windows Update (only .NET and feature update affected, others like Virus Definition updates, driver updates and SQL updates are not affected).

    My current workaround is manually downloading MSU update packs from Update Catalog and manually installing the affected updates. Sometimes installed updates (especially feature updates that changes the version number) will still be shown as not installed and installation failed, in which case I have to use a DiagCab file to hide the incorrectly shown update.

  • Installing optional features (like extra fonts). In Systen Settings I cannot bypass the permission error issue because running dism /Online /Add-Capability /CapabilityName:<What I wanted to install> will just stuck. I can't even Ctrl+C to force stop the command.

  • When troubleshooting "Indexing options", there will always be an error "Windows Search is not available.", which after repairing with Admin permission, will be shown as "fixed" but will occur again when running troubleshooter again. Besides, after troubleshooter tries to repair the problem, another irreparable error "Incorrect permissions on Windows Search directories" will show.

The problems I mentioned above cannot be fixed with in-place upgrade. What's worse, even after fresh install, this problem will always come back after a while (hence I called the problem "plaguing" me). It seems that my initial setups after OOBE has been causing the issue. But I am not sure what caused it.

After multiple reinstallation on my PC today, it seems that all the issues will come back after I install something with WinGet (I also keep a PS1 script with a list of programs I need so that I can one-click install all the stuff I need after OOBE). Last time the problems occure after installing Google Chrome Remote Desktop and Google Drive Client via winget. Though I don't know if these programs specifically cause the issue because uninstalling them won't make the error go away.

The problem affects both Windows 10 (19043, 19044) and Windows 11. It seems very unique to me as I've asked similar question on different platforms but no one can answer the question.

5
  • Any of these: 80070005 may appear when the hard disk has not sufficient space. computer BIOS might be incompatible or it might need to be updated. video adapter drivers may be incompatible device driver or a system service might be damaged. Bad third party program. ....... ospeedy.com/kb/80070005.html
    – John
    Mar 13 at 23:39
  • There have been no feature updates released since last November. Do you mean 21H2? It’s odd this problem continuously happens, are these fresh installs, or the same install that is upgraded to those incremental versions?
    – Ramhound
    Mar 14 at 0:57
  • Since this issue is very much unique to me, I don't think this is caused by BIOS/Video Adapter issue, as I'm using standard components and drivers. Also only doing fresh installation with disk wipe will make the problem go away for a while before reappear. I tried fresh installation with ISO created by Media Creation Tool and UUPDUMP.net, no difference for the result though.
    – user167420
    Mar 14 at 8:13
  • 0x80070005 is a permissions issue.
    – Moab
    Mar 14 at 15:06
  • @Moab I know it. The problem seems to affected most events that normally are carried out by TrustedInstaller. I suspect something I've done after OOBE has messed up TrustedInstaller's permission. Though I don't know for sure what.
    – user167420
    Mar 14 at 21:18

1 Answer 1

0

Something you did (or didn't) has modified the permissions of essential folders in Windows or destroyed some basic Windows components.

Check the disk by consulting its SMART information and running chkdsk (do not use the /f option). If disk errors are found - replace your disk. Otherwise, continue on.

Do some deep antivirus scans by several well-known products. I suggest using Windows Defender and Malwarebytes. If (real) viruses are found, you will need to reinstall Windows from scratch.

If no viruses are found, I suggest to Repair Install Windows 10 with an In-place Upgrade.

Take care of your backups before doing any of the above.

1
  • CHKDSK and SFC /SCANNOW don't report any issues. And in-place upgrade won't solve the issue either. Even fresh reinstall and BIOS update won't solve the issue -- the error will simply come back several reboots after OOBE.
    – user167420
    Apr 23 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.