Skip to content

Instantly share code, notes, and snippets.

@Demiu
Last active May 23, 2024 11:03
Show Gist options
  • Save Demiu/2a41441a67fedb7fab20bc0696b5c8f5 to your computer and use it in GitHub Desktop.
Save Demiu/2a41441a67fedb7fab20bc0696b5c8f5 to your computer and use it in GitHub Desktop.
How to properly move AppData in Windows 10

Moving AppData folder on Windows 10

  1. Create a new user with administrator permissions
  2. Sign out of the current user and sign in as the newly created user
  3. Navigate to C:\Users in File Explorer
  4. Click into the account you want move AppData from
    • There could be a popup telling you that you need to allow yourself to access that user's data, do so
  5. Cut the AppData folder
    • If invisible, go to View and check Hidden Items
  6. Paste in the desired location
    • Some errors will show up:
      • exe's with size of 0 will pop up errors 0x80070780 "This file cannot be accessed", skip them
      • tbres' and other various files will pop up saying they shouldn't be moved and are you sure, always yes
  7. Wait for the operation to finish
  8. Navigate back to the AppData location before the move
  9. Delete the old folder
    • It contains those exe's that couldn't be accessed, they can be deleted though
  10. Launch Command Prompt as admin
    • I recommend ctrl+R, typing cmd and ctrl+shift+enter
  11. Navigate to the User folder of the moved account
    • cd ..\..\Users\Account_name_here
  12. Create a junction named AppData to the moved folder location
    • mklink /j AppData "Z:\Path\To\New\AppData"
  13. Log out of the new user, log back in as the user with the moved AppData
    • Start menu will not work, throw an error and ask you to sign out to fix it, that won't work, ignore it
  14. Start powershell as admin
    • Same method as with cmd
  15. Fix the UWP packages
    • Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    • This will fix the start menu by adding back the applications you "deleted" in step 10
    • Some packages may fail because a newer version is already installed, that's not a problem
    • Some may fail because on the new user the packageds cannot be installed while they're running (notable: StartMenuExperienceHost), kill them:
taskkill /F /IM explorer.exe
taskkill /F /IM SearchApp.exe
taskkill /F /IM SearchUI.exe
taskkill /F /IM ShellExperienceHost.exe
taskkill /F /IM StartMenuExperiencehost.exe
  1. Sign out, restart, sign back back in
  2. Delete the user created in step 1
  3. Some packages may still be broken, you may fix them as needed
    • Get-AppXPackage *WindowsStore* -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    • Replace the WindowsStore with name of various UWP apps that break
@n4n0lix
Copy link

n4n0lix commented Feb 25, 2023

For me at Step 15 the command was not doing anything (and yes, I was running it in an Admin PowerShell).

I had to run these

sfc /scannow
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth

then restart and I could continue with Step 15.

@Knewest
Copy link

Knewest commented Mar 7, 2023

I did everything listed (although I did the extra step @n4n0lix listed above) and it all worked out as intended. Thank you so much for your detailed guide. You have saved me a lot of money and time. The power Junctions and SymLinks must not be underestimated! 😁

@skylyn
Copy link

skylyn commented Apr 5, 2023

Thanks for the guide! I followed these steps and I got everything working except for the Xbox app. The app will launch, and I can browse, but I cannot sign into the app. Click Sign in just does nothing. I also cannot subscribe to Game Pass - clicking that also does nothing. I am signed into the windows store, and it shows that account in the settings section in the xbox app, but I'm unable to sign into the xbox app itself.

I have tried running the command to fix Xbox from an admin powershell window, after making sure all Xbox related processes were stopped. I get zero errors, and it runs successfully. However, I'm still unable to sign in to the xbox app after running it.
PS C:\WINDOWS\system32> Get-AppXPackage *Xbox* -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

Any help getting the Xbox app working fully is appreciated!

@idkakorin
Copy link

The app will launch, and I can browse, but I cannot sign into the app. Click Sign in just does nothing. I also cannot subscribe to Game Pass - clicking that also does nothing. I am signed into the windows store, and it shows that account in the settings section in the xbox app, but I'm unable to sign into the xbox app itself.

I have the same problem, but I didn't find a way how to manage it.

@Radwan-Albahrani
Copy link

Idk if this is active however after moving appdata i have been facing an issue with the phone link app and when i try to reinstall it i get this error

Add-AppxPackage: Deployment failed with HRESULT: 0x80073CF9, Install failed. Please contact your software vendor.

Deployment Register operation with target volume C: on Package Microsoft.YourPhone_1.23082.131.0_neutral_~_8wekyb3d8bbwe from:  (AppxBundleManifest.xml)  failed with error 0x800700EA. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.

NOTE: For additional information, look for [ActivityId] cbc12e19-fa40-0001-904f-c4cb40fad901 in the Event Log or use the command line Get-AppPackageLog -ActivityID cbc12e19-fa40-0001-904f-c4cb40fad901

I tried almost everything except for just resetting the device. Even in a new profile, the phone link app refuses to work. Any help would be appreciated

@n4n0lix
Copy link

n4n0lix commented Oct 9, 2023

Coming back to this after 8 months: There was a Windows Update that broke all UWP applications for me (Calculator, Photos, Cortana, Microsoft Store, etc.). Sadly I didn't find any solution to it but also just looked for a couple of hours and then replaced the apps with alternatives and moved on. But for future readers this might be something you have to accept.

That might also be what broke the Phone Link App for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment