Is it possible to move the Windows Apps installation folder to another drive?
Some time ago I moved my system drive to the SSD rails. But getting updates from Microsoft that can take more than 5 Gb at a time I had to keep an eye how much free space is available. Then I started to think what can be removed or moved to another drives. I noticed that a lot of Windows Store Apps are installed and consume a quite big amount of expensive memory. For example, only one of the Store applications takes more than 1 Gb of space on the drive. So, I decided to change the picture dramatically and change the location of Windows Apps.
In general, there are two main ways for getting the job done.
As a rule the Windows Apps installation folder is hidden and located on the OS drive in the Program Files folder (not x86).
You can see the hidden folders and files selecting the Hidden items check box on the ribbon.
If you try to open the folder immediately, you will see the following prompt:
And even if you click the Continue button on the displayed dialog you will not see the content. Instead, another dialog window will be shown with the following message:
The reason is that you don't have sufficient permissions to open the WindowsApps folder!
To solve the issue open the charms bar and choose the Search button. In the text box type the cmd text and in the context list do the right click on the Command Prompt entry. Then select the Run as administrator context menu item as shown on the screenshot:
Even if you try starting to fix the cause of error messages you will get new ones. See What to do if your Windows 8 Modern App fails to start for directions.
To summarize all of these I can conclude that MSFT fixed a possible bug and doesn't allow to move the Windows Store Apps installation folder anywhere. But if you are still using Windows 8 - you are lucky. Go ahead and move the folder wherever you want!
In general, there are two main ways for getting the job done.
1. Change the value of the PackageRoot key in the windows registry.
You can find it in the following hive:
Don't forget to restart the machine to apply the changes. That's it.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx
2. Move the original folder to a new drive and create a symbolic link instead.
As a rule the Windows Apps installation folder is hidden and located on the OS drive in the Program Files folder (not x86).
You can see the hidden folders and files selecting the Hidden items check box on the ribbon.
If you try to open the folder immediately, you will see the following prompt:
You don't currently have permission to access this folder. Click Continue to permanently get access to this folder. |
And even if you click the Continue button on the displayed dialog you will not see the content. Instead, another dialog window will be shown with the following message:
You have been denied permission to access this folder. To gain access to this folder you will need to use the security tab.
The reason is that you don't have sufficient permissions to open the WindowsApps folder!
To solve the issue open the charms bar and choose the Search button. In the text box type the cmd text and in the context list do the right click on the Command Prompt entry. Then select the Run as administrator context menu item as shown on the screenshot:
In the command prompt window run the following command:
takeown /F "C:\Program Files\WindowsApps" /A /R
Don't be scared, the command is run for all files and folders, so the following output will be displayed in the window:
Now is the time to make an exact copy of the WindowsApps folder on another drive where you want to move it to. Run the following command in the same command prompt window:
where D:\WindowsApps is the new path where it should be moved. Be aware, you need to run all commands in the window which has the Administrator keyword in the caption.robocopy "C:\Program Files\WindowsApps" "D:\WindowsApps" /E /COPYALL /DCOPY:DAT
You will see the following description of the operation:
Make sure that all operations were successful and there were no errors. If you see any, just remove the destination folder and repeat the process anew.
Now, if your files and folders were copied without errors you, can remove the source folder on the system drive. On my machine the path is C:\Program Files\WindowsApps.
Just run the following command in the same command prompt:
rmdir /S "C:\Program Files\WindowsApps"
You will be asked to confirm the action because it is not a safe operation. Just click Y and hit the enter button on the keyboard!
Note, you need to close all Apps before removing the original folder. Sometimes you will have to remove the PC to get them unloaded.
The last step is to make a symbolic link instead of the source folder (which points to the new folder). Here is the command to run:
mklink /D "C:\Program Files\WindowsApps" "D:\WindowsApps"
Under the hood Windows 8 doesn't differ link or folder. So, all works out of the box.
But the described scenario is not officially supported by Microsoft. It seems this is a bug because after upgrading to Windows 8.1 the location of the WindowsApps is locked and you can't move it anywhere. To tell you the truth you can, but you will get various errors when trying to install any application from the Store:
Your purchase couldn't be completed. Something happened and your purchase can't be completed. Error code: 0xd00002b8
To summarize all of these I can conclude that MSFT fixed a possible bug and doesn't allow to move the Windows Store Apps installation folder anywhere. But if you are still using Windows 8 - you are lucky. Go ahead and move the folder wherever you want!