Skip to content

Instantly share code, notes, and snippets.

@Demiu
Last active May 10, 2024 08:51
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
@micdev42
Copy link

In the end I gave up and replaced my 256 GB SSD C: drive with a 1 TB Crucial MX500 for £70. Then left AppData where it is... Much simpler and much less time messing about - if only I'd done that first!

@wmzd
Copy link

wmzd commented Sep 26, 2022

You don't need to move the whole AppData folder, you can do this to that "problematic" folder within AppData.

@Demiu
Copy link
Author

Demiu commented Sep 30, 2022

@micdev42 Sorry for late reply looks like you've resolved your problem. Anyway, you can recognize what's broken by the fact that it no longer works 😋 In my case it was a very obvious crash of explorer when opening the start menu, but YMMV

@chaosmonger
Copy link

So, I've followed the procedure, but I still have various issues which are driving me insane.
Please note that I couldn't move all the folders from AppData, no matter how hard I tried (some weird error with IE5). Of course I was running as administrator, etc... I've kept those files on an AppDataOLD in C:. While the rest of AppData is now in E:.
I haven't tried all my apps and programs that I've installed, which are A LOT.

But, some Windows functionality are compromised:
1- Nothing happens if I click the right-mouse button on the task bar, so I cannot pin apps, close them with right click, etc.
2- The Search bar in Explorer doesn't work, neither it does from the Start menu, so it's hard for me to launch CMD and similar (I can do it only from Task Manager).
3- Snippet and other small Windows tools aren't working.

Running the Get-Add-AppxPackage I get this error:
"Cannot find path 'C:\AppXManifest.xml' because it does not exist."
However, it seems to run, I get a lot of "Depolyment" errors, even though some seems to work.

Now, I cannot do a hard reset of Windows, because I truly have tons of stuff in C (software and whatnot), and I'm running out of time for a job (I've actually moved the AppData because I truly needed some space in C:), but I cannot waste more time...

Any ideas on how to solve the problems above? Or any third party tool to do the job?
Anything, please!

@chaosmonger
Copy link

chaosmonger commented Oct 7, 2022

More info:
WindowsStore, Snipped, etc... they open for a frame, then close.
Some deployment (like WIndowsStore) don't do anything but stall the powershell.

Is there a way to re-install Windows and fix all those errors without losing anything else in C nor losing apps, programs, etc.?

I've tried this: https://answers.microsoft.com/en-us/windows/forum/windows_10-windows_install/how-to-perform-an-in-place-upgrade-with-windows-10/7f0b236e-3c6c-4913-9691-c4baa2a6190a

But after a while it said: "Windows Updated Failed"...

@Demiu
Copy link
Author

Demiu commented Oct 16, 2022

@chaosmonger All the changes should be local to the user, so a new user would have no problems.

@Zerdayne
Copy link

Hey,

one important step is missing.

After following the steps I had multiple issues regarding Windows Store and some Windows Store Apps, couldn't sign into my Microsoft Account, my Ubuntu distribution and everything that depends on my WSL distribution.

Windows Store couldn't open effectively. It opened, loaded for a few seconds and instantly closed again.
Accessing my WSL 2 distribution always ended up failing with the message "Access is Denied".

There is only one App I still have issues with, at least it is the only one I'm aware of as of now: Microsoft Teams.

I finally could fix all that stuff: I needed to grant my Windows User "Full control" Permissions in the new Directory.

@rebosante
Copy link

First process worked for me! Well I didn't even had to restart.. I had previously moved the appdata folder to my external drive following this tutorial https://www.addictivetips.com/windows-tips/move-appdata-windows-10/
But I didn't know how to fix the menu issue.. so I started this tutorial from step 13. And it worked! Thank u

@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