I have solved this myself nonetheless:
From an administrator command prompt the following command will copy the WindowsApps package folder (or any folder within):
robocopy /B /E /COPY:DAT D:\WindowsApps\xxx D:\MyTargetDir
This will copy the WindowsApps\xxx
package folder on D:\
to MyTargetDir
folder on D:\
. This works because the /B option tells Windows to use the Backup token which ignores any permissions or limitations / policies.
After that the files need to be decrypted:
cipher /D /S:D:\MyTargetDir
Then the files can be edited.
Remove the original folder (or rename it):
mv D:\WindowsApps\xxx D:\WindowsApps\xxx_
And then copy back the edited files:
robocopy /B /E /COPY:DAT D:\MyTargetDir D:\WindowsApps\xxx
HOWEVER: Note, I still haven't figured out how to make the edited app start, as for now Windows Store will return errors for the apps in these folders as soon as the permissions are changed. Changing them back won't work.
Interesting, in my case "The usual methods of taking ownership" already gives me the right to change and create files/folders (Windows 10 Pro). In what specific case isn't it enough? – Albin – 2018-10-09T09:25:17.030
1@Albin: It's not enough since Windows has built-in protections specially for this folder that can only be worked around, not removed. – harrymc – 2018-10-09T09:40:32.083
@Albin Maybe you are not using Windows 1803 or 1809, because these version don't allow any file edits even when you have taken complete control, I will test these steps asap. – Gizmo – 2018-10-09T10:13:39.337
@harrymc I just checked, I'm using version 1803 on my testsystem. I also double checked, I tried to edit and save an (exiting, not created by me) xlm file. It works without problems. – Albin – 2018-10-09T10:21:51.553
@Albin: I don't know the settings on your computer and I cannot diagnose, Microsoft does not furnish any information about this. – harrymc – 2018-10-09T10:25:14.620
@harrymc There are no "additional" settings. It's a updated but otherwise untouched Win10pro System, I just changed the ownership. Also after reapplying the ownership, the user keeps the access using the IU-methode, you don't necessarily have to use the command line method to keep you're access. – Albin – 2018-10-09T10:35:56.643
@Albin: Everything is possible where Microsoft is concerned. – harrymc – 2018-10-09T10:37:53.153
:'D anyway let me know the results of you're test – Albin – 2018-10-09T10:39:11.267
1So I tested by just using
icacls /save
thenicacls reset
thenicacls /restore
but that made the apps unusable too. Something is getting broken / not restored. I'm stuck in figuring out how to make the apps work again after gaining access to the folder, even without modification. I do have developer mode enabled so I should be somehow able to launch the apps outside of WindowsApps folder, I just don't know how.. but developers should be able to test their apps, right..? I ran all commands from a "Trusted Installer" CommandPrompt (RunAsTi64) because running it from admin wouldn't work. – Gizmo – 2018-10-09T22:01:51.020Doing it from a boot CD/USB might work better. – harrymc – 2018-10-10T07:31:35.577
I didn't want the bounty to go to waste and as this is the most comprehensive answer I gave it here. – Gizmo – 2018-10-15T12:08:42.753
@Gizmo: Did you solve the problem? – harrymc – 2018-10-15T12:10:03.263
no, It seems microsoft encrypts the files on the disk using a key, that is only aquired when launching the app from the ms-store. I don't know how to copy this key. Obviously there is no documentation for that. – Gizmo – 2018-10-15T12:52:45.027
@Gizmo: Obviously. – harrymc – 2018-10-15T13:05:08.010
I'm on Windows 1909 and these steps apparently no longer work for allowing edit access to the files under WindowsApps. I can see and read them, but not edit or create. – Nathan Reed – 2019-12-21T01:28:13.397
(And nor can I copy or move files into WindowsApps.) – Nathan Reed – 2019-12-21T02:09:04.107