Windows Store error 0x80070005 when moving/installing apps to any drive other than C:

Discussion in 'Operating Systems' started by Darren Hodgson, Jul 24, 2016.

  1. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    I've had Windows 10 Pro installed as an upgrade from Windows 8.1 Pro since just before its official July 2015 release and since then it has been upgrading to v1511 last November and, finally, to various v1607 builds in the past few weeks to the current Build 14393.3 I am using now. I have been using a standard admin Microsoft account since Windows 8 so there have been no changes to my accounts. My PC was built in June 2013 which was when I installed Windows 8 Pro.

    Although, Windows runs 100% stable and all games and apps work as they should with no unexpected crashes or anything like that, I've encountered issues with the Windows Store updating certain apps and games which had been installed months before and had previously been updating fine. These apps are located on my H: drive, which is where I have either installed them or moved them to over the months to save space on my 256 GB boot SSD. The error is 0x80070005; I believe this means "access denied".

    However, it seems that apps and games installed on the Windows drive C:, will download and update fine. I've also discovered that I can move these affected games and apps from H: to C: and they will also update fine. If I set the Storage location back to C: then, again, I can install new games and apps fine as they are placed on the Windows drive. So there does not appear to be an issue with the way the Windows Store works when using the default Storage location (which is C:).

    Alas, once I've moved games and apps to C: to update them then I am unable to move them back to H:... or any other drive for that matter, which includes D: and E: (these drives did not have a WindowsApps folder as I have never used them for relocating Windows Store apps previously). The error I get when attempting this is, you guessed it, error 0x80070005!!!

    Things I've tried to fix this issue include taking ownership of the H:\WindowsApps folder and the H:\WpSystem folder and changing the owner from TrustedInstaller to Darren and Administrators. I've even set all the accounts showing under Properties > Security to Full Control, added ALL APPLICATION PACKAGES, Everyone, Users, LOCAL SERVICE, NETWORK SERVICE... nothing works! It's infuriating. :bang:

    I did notice that the root permission for my H: drive was set to SYSTEM as are the ones for my D: and E: drive. My C: drive shows as Administrators though. Could this be the issue? What is the correct permission seeing as it doesn't affect Steam, Origin and UPlay games which are installed across my D:, E: and H: drives? I set the owner to Administrators on the root but did not take full ownership of the drive, only changed the H:\WindowsApps folder to Administrators (which did not work needless to add).
     
  2. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    After using Tweaking.com's Windows Repair All in One v3.9.5 tool in a last ditch effort to fix the error and completely messing up the Windows install (missing taskbar icons for Store, Xbox, Photos, etc, and Edge plus the Store opening and instantly closing), I decided to restore my backup of Windows 10 Pro v1511 Build 10586.494 from 14th July 2016. I then tried to move apps and games from C: to H: but got the same error so clearly the issue, whatever it is, was there before upgrading to Insider Preview Build 14393.

    That said, I was able to set the Storage location for apps to H: and download both Forza Motorsport 6 Apex (Beta) and Killer Instinct to the H: drive once I'd uninstalled them. Thinking that I had a solution to the issue, I went ahead and upgraded straight to Build 14393 again. But, and it's a big but, I am unable to download those same games to H: under this v1607 build of Windows with Storage set to H: despite it working under v1511! I have been able to download Forza to my C: drive though, once I set the Storage location to C: but, again, I am unable to move it back to H:!

    GRRRRRRRRRRRRRRRRRRRRRRRR!!!

    I did some reading and found that you can move Windows Store packages via Powershell so here's what I tried:

    1. Opened an elevated Powershell window;
    2. Typed Get-Appxpackages and pressed Enter which then lists all the installed apps and games.
    3. I found the full package name for Forza and typed Move-Appxpackage "Microsoft.APEXPG_1.3.12.0_x64__8wekyb3d8bbwe\AppxManifest.xml" -Volume H: (cut and paste from the listing to avoid mistyping it) and got this error:

    move-appxpackage : Deployment failed with HRESULT: 0x80070005, Access is denied.
    error 0x80070005: Creating file \\?\H:\WindowsApps\Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bbwe\AppxManifest.xml
    failed.
    NOTE: For additional information, look for [ActivityId] aaf12b4c-e58c-0001-938e-f1aa8ce5d101 in the Event Log or use
    the command line Get-AppxLog -ActivityID aaf12b4c-e58c-0001-938e-f1aa8ce5d101
    At line:1 char:1
    + move-appxpackage -package "Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bb ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : SecurityError: (Microsoft.ApexP...__8wekyb3d8bbwe:String) [Move-AppxPackage], PSSecuri
    Exception
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.MoveAppxPackageCommand


    The error also contains a command for more info, Get-AppxLog -ActivityID aaf12b4c-e58c-0001-938e-f1aa8ce5d101 so I typed it and got this:

    Time ID Message
    ---- -- -------
    24 Jul 2016 12:08:00 pm 301 The calling process is powershell.exe
    24 Jul 2016 12:08:00 pm 603 Started deployment MovePackageOperation operation on a package with main
    parameter: Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bbwe and Options:
    ForceApplicationShutdownOption. See
    http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app
    deployment issues.
    24 Jul 2016 12:08:00 pm 10002 Creating Resiliency File C:\ProgramData\Microsoft\Windows\AppRepository\306e3e3f
    -89d4-4bf5-a008-009a230a20a1_S-1-5-21-2433208727-1117016099-336912914-1007_1.rsl
    c for MovePackageOperation Operation on Package
    Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bbwe.
    24 Jul 2016 12:08:00 pm 607 Deployment MovePackageOperation operation on package
    Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bbwe has been de-queued and is running
    for user DARREN\Darren.
    24 Jul 2016 12:08:03 pm 10000 About to service package Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bbwe. Setting
    the package state to disabled returned with 0x0.
    24 Jul 2016 12:08:03 pm 462 error 0x80070005: Creating file \\?\H:\WindowsApps\Microsoft.ApexPG_1.3.12.0_x64
    __8wekyb3d8bbwe\AppxManifest.xml failed.
    24 Jul 2016 12:08:03 pm 470 error 0x80070005: Package update failed for
    Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bbwe. Re-stage package
    Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bbwe.
    24 Jul 2016 12:08:03 pm 605 The last successful state reached was PreStagePackagesInUseClosed. Failure
    occurred before reaching the next state Staged. hr: 0x80070005
    24 Jul 2016 12:08:03 pm 10001 Finished servicing package Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bbwe.
    Setting the package state to enabled returned with 0x0.
    24 Jul 2016 12:08:03 pm 401 Deployment MovePackageOperation operation with target volume H: on Package
    Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bbwe from: (AppxManifest.xml) failed
    with error 0x80070005. See http://go.microsoft.com/fwlink/?LinkId=235160 for
    help diagnosing app deployment issues.
    24 Jul 2016 12:08:03 pm 404 AppX Deployment operation failed for package
    Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bbwe with error 0x80070005. The
    specific error text for this failure is: error 0x80070005: Creating file \\?\H:\
    WindowsApps\Microsoft.ApexPG_1.3.12.0_x64__8wekyb3d8bbwe\AppxManifest.xml
    failed.


    Does that help identify what the issue is to anyone who understands it please? I would be so grateful for any help as this is driving me mad. My only recourse at the moment, since a clean install of Windows or even a repair install is not possible at the moment, is to buy a larger 1 GB SSD!

    Thanks in advance.
     
    Last edited: Jul 24, 2016
  3. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    One final thing I neglected to mention was that if I have the H:\WindowsApp folder open while trying to move or install a game with the Storage location set to H: then I can see a folder being created for it but at most it will contain one file but usually remain empty until I cancel the install from the Store at which point the folder will then disappear, presumably deleted by the Store.
     
  4. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    OK, so apparently I *CAN* move games from the C: drive to a FAT32 formatted USB memory stick N:, albeit the one I am testing, Oxenfree, is very slow even though it is only 3.4 GB in size. When I try to access the N:\WindowsApps folder though I get an access denied error and I am unable to even view the security permissions. Maybe that is due to FAT32 not having security permissions? All my other drives are formatted as NTFS.
     

  5. tsunami231

    tsunami231 Ancient Guru

    Messages:
    14,702
    Likes Received:
    1,843
    GPU:
    EVGA 1070Ti Black
    I get this error ( 0x80070005)when I try to upgrade my other pc to from win7 to win 10

    Both windows upgrade assistant and media creation tool throw that error at me, I think I might have to boot off a USB stick and upgrade that way
     
  6. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    Yes, I've seen error 0x80070005 ("access denied") in relation to Windows Update and Windows installations but in my case they work and it is the Windows STORE that only has this issue and only with moving or installing files to other drives. If I set my Storage location to C: (which is the default) then I have no problems. On my system, there is some security permissions "bug" when Windows has to write files to other drives but it can still move them from H: to C:.

    It's a really strange and annoying issue. I had to redownload Forza Motorsport 6 Apex (Beta) and the only way I could was to set the Storage location for apps to C:. Left at H: the install would fail after downloading some 12 MB with error 0x80070005.

    I think my only option, considering the lack of response to my three threads on different forums, is to (a) buy a larger 512 GB+ SSD; and (b) do a repair install of Windows once the v1607 Media Creation Tool/ISO is released on 2nd August. It may be that only a clean install will fix this issue but that is not really an option right now due to the number of games and software I have installed.
     
  7. tsunami231

    tsunami231 Ancient Guru

    Messages:
    14,702
    Likes Received:
    1,843
    GPU:
    EVGA 1070Ti Black
    that is something i noticed windows has "issues" with permissions even win7 did, I usual had to install burf aio VC and run his ngen bat to fix those issue that happen from just a fresh install.

    I also just tried to upgrade to win 10 on my other pc via usb boot, but even that didnt want to work cause the in windows update was started, which was what was failing with that error to begin with, but that also said
    disable "anti virus" and try again which i did and never work, but i got work now, I think, atlest it got father then before

    as for the store well i dont use it only app I still have install is bing Weather app.

    That error code make reference to permissions issue and anti virus depending on where you look.
     
    Last edited: Jul 26, 2016
  8. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    Just a quick update...

    I have managed to resolve this issue on my PC although, unfortunately, it now appears that the issue DID arise as a result of upgrading from v1511 Build 10586.494 to v1607 Build 143xx after all as I restored my backup of the previous build from 23rd July in the early hours of this morning, after noticing many Store games were opening and instantly closing (even after uninstalling and redownloading/reinstalling them). I tried taking taking ownership of the C: WindowsApps folder but I could not get them to load so I decided to just go back to the last stable build.

    Now I am able to move games and apps (non-system ones) from C: to H: with no error. A few games did seem to have issues starting (they'd open then close) but I believe they were ones that were on H: then moved onto C: while v1607 was installed (since I could move them from H: to C: without the 0x80070005 error as stated above). What I think happened there was that I'd restored my v1511 build again last week, after moving certain games from H: to C: to update them on build v1607, but that backup did not contain the apps on C: (since it was done before they were moved). Therefore Windows still though they were on C: but in reality they weren't on C: or H:!!!

    Anyway, I have been able to uninstall those few games and redownload them (to H: of course... FINALLY!!!). I am even downloading both Killer Instinct and Forza Motorsport 6: Apex (Beta) to my H: drive something that I have been 100% unable to do on any of the v1607 builds!

    So this thread perhaps serves as a warning for anyone thinking of upgrading to the Anniversary update on 2nd August... I would seriously consider doing a full backup of your current Windows drive first before you do so. On my system, this update seemed to have messed up the security permissions for installing Store apps and games on any drive except the Windows C: drive and I was not able to fix it (believe me, I tried just about everything I could think of).

    I will wait for the final build on the 2nd August, do another backup before I install it and then if I still have this issue then I will revert back to v1511 (for what would be the fourth time) and just defer the update until more people have been able to report feedback. It may be just specific to my setup and a one-off or it may be an issue others may have who upgrade a system that has existing apps and games that had previously been moved or installed to other non-C: drives before the upgrade.
     
  9. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    I've just installed v1607 Build 14393.5 from a mounted ISO of En-GB_Windows_10_Pro_14393_x64_DVD.iso and post-install I am *STILL* getting error 0x80070005 whenever the Store tries to update any of its apps and games on my H: drive (and any other drive except C: for that matter) or if I try to move anything from C: to H: or any other drive (yet I can move from H: to C.

    This issue is absolutely infuriating me and does not happen on v1511 Build 10586.494. Looks like I'm going to have to restore the previous build AGAIN then set the Defer Upgrades option and pray that Windows does not install this build come 2nd August.

    Can someone running this build please do me a huge favour and change your Storage location to another drive then try installing or moving a Windows Store app or game to that drive? Does it work OK for you or does it fail with error 0x80070005?

    Note: that most of my Store games and apps on H: were installed some time ago, some when I had the release version of Windows 10 but until I installed v1607 of Windows they have never failed to install or update to my H: drive.
     
    Last edited: Jul 30, 2016
  10. zig11727

    zig11727 Member Guru

    Messages:
    129
    Likes Received:
    23
    GPU:
    Aorus 2080 Ti
    I running build 14393.5 and could not install anything from the windows store to any other drive than c:

    Here is what solved the problem for me


    This fixed the problem

    https://www.youtube.com/watch?v=0BYhXjVPMns

    also reboot after you apply the fix. I tested it with Hydro Thunder and it installed to my H: Drive successfully.
     

  11. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    @ Zig11727 - Thank you for replying.

    So the fix for this issue is to use the Windows UPDATE troubleshooter not the Windows STORE APPS one? The error in that video is not the same one I am getting though... Was you getting the error in the video or the one I'm getting: 0x80070005?
     
  12. zig11727

    zig11727 Member Guru

    Messages:
    129
    Likes Received:
    23
    GPU:
    Aorus 2080 Ti
    To be honest I forget the error but running the trouble shooter I was able to install apps to my H: without a problem.

    I would give it a shot if you have a roll back system you have nothing to lose.
     
  13. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    I ran it under the restored v1511 since there's a possibly that the issue lies there and it breaks some when I upgade to v1607. Well, the Windows Update troubleshooter did find something related to the storage location which it fixed. Thinking that it had just set my H: drive but to C:, I checked the Storage location but it still shows as H: so maybe that was part of the issue?

    I will obviously be upgrading at some point to v1607 so if that didn't fix it then I'll run it again post-upgrade. Thanks for posting.
     
  14. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    Could my external hard drives and SanDisk flash drives be incompatible in some way with UEFI? For UEFI to work, do all the devices have to support it or just the boot drive? That's something I'm not really clear on.
     
  15. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    The UEFI boot issue is thankfully resolved thanks to help and instructions from mbk1969.

    However, the Store permissions issue still remains...

    Thinking that my profile might be corrupted, I tried creating a new Admin local account called Daz and then signed into my Microsoft account (the same one I use for my main Darren admin account) but when I tried to download a game I owned, Rayman Jungle Run, it failed with error 0x80070005.

    One weird thing I did notice when viewing the permissions is that even though I was showing as the owner of the WindowsApp folder, I am unable to change the permissions for any of the principals (View shows instead of Edit). Is that right?

    Here is a screenshot of the security permissions for my H:\WindowsApps folder:

    [​IMG]

    Here are the ones for the H:\WpSystem folder:

    [​IMG]

    Would someone be kind enough to move or install an app to a non-C: drive and then take screenshots of their WindowsApps and WpSystem folders please on Windows v1607 so I see who the owner should be and what principals should be showing. I would very much appreciate it.

    Thanks.

    P.S. The screenshots MUST be from the Anniversary build as I already know everything works fine on v1511 and with the changes comparing them would not be consistent IMO.
     

  16. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,505
    Likes Received:
    13,526
    GPU:
    GF RTX 4070
    Btw, have you tried to replicate permissions and owner from working apps folder on C: drive to failure folder on H: drive? Not to hold full control on that malice folder but to mimic it as a legit one.

    Also you can advance a bit more and use Procmon.exe from SysInternals Suit to spy on app launched from the failure folder on drive H: - namely the file and registry operations. There you can find a source of trouble. Be aware though that parsing vast log in this tool can be exhausting.
     
  17. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    Hi mbk1969!

    What I did try, rather than risk corrupting the permissions on my H: drive for the Store apps and games is to set the Storage location for apps to E: when I had Windows v1511 installed then took screenshots of what permissions both the WindowsApps and WpSystem folders had (since I could move, install and update apps in that build of Windows, no problems).

    I have not yet tried to replicate the settings in v1607 though, mainly because the problem is that I cannot install or move apps/games to any other drive than C:. If I could then I wouldn't be having to mess around with permissions in the first place!

    It's all very frustrating really. :bang:
     
  18. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    What I'm not very clear on is which folders actually hold the permissions for the Store. From what I think I know, the Store apps and information for them are held in several locations when the Storage location is left at its default C:...

    C:\Program Files|WindowsApps - This is where the actual apps are stored
    C:\Users\Darren\AppData\Local\Packages - This is where the manifests are located, I think, which allows you to reinstall previously downloaded apps... I think.

    There is also, I believe, a third folder inside the Windows folder that is tied into the Store and possibly Windows Update as well.

    When you move a game to another location, say, drive X: then Windows creates a X:\WindowsApps and X:\WpSystem folder, the latter of which appears to contain SIDs with a Packages folder inside them.

    What I'm not clear on is whether all the Store apps, regardless of what drive they're on, have info (manifests) stored in the C: drives Packages folder with the WpSysyem folder containing duplicates, or are they kept on the drive they are installed on.

    I've tried taking ownership of the two folders (WindowsApps and WpSystem) on the H: drive but I still get error 0x80070005 when attempting to move something from C: to H: or if I try to install a new app/game with the Storage location for apps set to H: (or any other drive).

    As I mentioned earlier, I was able to move a Store app to my USB flash drive that was formatted as FAT32 but, I understand, that works because FAT32 does not support security permissions. One thing I did consider trying was moving a game to a USB flash drive then from there to H:. Might try that later although I suspect the error will still occur because the issue is not moving from the location but rather writing to the new one. I know already that I can move apps and games from my H: drive to the C: drive and that requires Windows to copy the files to the target then delete the ones at the source. If it can delete at the source then why can it apparently not write to there?

    Hopefully, you'll see what I'm driving at?
     
  19. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    Ah, the third location I referred in post #18 is C:\ProgramData\Microsoft\Windows\AppRepository as shown in the error text in post #2 above.

    Could the permissions be wrong for that?

    I did notice when reviewing the event log this morning that I have a 0x80070005 error, specifically:

    7.488: EFS service failed to provision a user for EDP. Error code: 0x80070005.

    I discussed it here: http://forums.guru3d.com/showthread.php?t=408448, a thread where I was trying to fix the numerous DCOM 10016 errors that appeared in the event log in Windows v1511. However, these seem to have gone in v1607, for better or worse, and the few errors I do have, include the EFS one which appears every so often.

    I found that EFS stands for Encrypting File System and I'm wondering if there is some connection between it and the issue I am having with the Store? It may be that the same issue is affecting both EFS *and* the Store, i.e. it is something else altogether, but the fact that they trigger the same error (access denied) may be helpful if I can work out what the error actually means... :3eyes:
     
    Last edited: Aug 4, 2016
  20. Darren Hodgson

    Darren Hodgson Ancient Guru

    Messages:
    17,179
    Likes Received:
    1,500
    GPU:
    NVIDIA RTX 4080 FE
    Does EDP mean Enterprise Data Protection? I'm running Windows 10 Pro so why is there mention of Enterprise?
     

Share This Page