Modifying UWP Applications using the MutablePackageDirectory feature
Today, we're exploring the WindowsApps folder that you find in Windows 10 and 11. This folder holds all the files for UWP (Universal Windows Platform) applications on your computer.
We'll show you how to safely make these changes using the windows.MutablePackageDirectories feature with the MSIX Packaging Tool and Advanced Installer.
What is the WindowsApps folder?
The WindowsApps folder is located under the C:\Program Files directory on both Windows 10 and 11 and it contains all the files related to UWP packages installed on the machine. Access to and modification of these files are restricted for standard users and even system administrators.
However, certain scenarios may require end-users to modify installation files, such as installing mods.
This is facilitated by the windows.MutablePackageDirectories extension.
How does windows.MutablePackagerDirectories extension work?
The windows.MutablePackageDirectories extension, when declared within the AppxManifest.xml file, allows an application to expose a folder within C:\Program Files\ModifiableWindowsApps - the mutable folder.
Here, the application’s installation folder content is projected, enabling users to modify installation files.
Each application can declare one or more mutable folders in the AppxManifest.xml file.
How do you modify UWP packages with MSIX Packaging Tool?
First, you need to open the AppxManifest file and declare the modifiableApp restricted capability.
<Capabilities> … <rescap:Capability Name="modifiableApp" /> … </Capabilities>
Next, declare the mutable folder as a package extension:
<Extensions> <desktop6:Extension Category="windows.mutablePackageDirectories"> <desktop6:MutablePackageDirectories> <desktop6:MutablePackageDirectory Target="MyApp" /> </desktop6:MutablePackageDirectories> </desktop6:Extension> </Extensions>
Here, the Target specifies the name of the folder under C:\Program Files\ModifiableWindowsApps where the application’s installation folder content is projected.
How do you modify UWP packages with Advanced Installer?
If you are an Advanced Installer user, then you don’t need to tweak the AppxManifest file manually.
All modifications can be made directly through the Advanced Installer GUI by navigating to the Declarations page and adding Mutable Packager Directories through the Package Declaration option.
Conclusion
Thanks to Advanced Installer's intuitive GUI, manual adjustments to the AppxManifest.xml file are obsolete. With just a few clicks within the Advanced Installer GUI, users can effortlessly implement necessary modifications. This functionality streamlines the process for both developers and end-users, ensuring efficient and flexible application deployment.
Whether you're adding mods or making other changes, Advanced Installer makes it easy. You don't have to mess with complex files yourself. Try Advanced Installer today through its 30-day free trial.