MSIX - Permissions to App Folder?

Occasional Contributor

I have an application which creates a log file in the application install directory (e.g. C:\Program Files\xyz\) upon shortcut launch. This can achieved well by granting permissions to the folder xyz under C:\Program Files using a custom action script with a traditional WI approach. Well with the MSIX, how can we achieve this?

2 Replies
best response confirmed by Sharla_Akers (Microsoft)

This is a classic challenge where PSF (Package Support Framework) can help you, more specifically one of its fixups called File Redirection:


You cannot set the permissions though, the MSIX has a built-in tamper protection, and prevents you from changing anything in the install directory. Instead, what PSF does for you is to redirect these calls to a place where there is a write grant (a special folder in local app data), and ensures that there is a transparent redirection on subsequent calls.


Some basic regular expression knowledge may be required to achieve the desired results (depending on the pattern for the files to be redirected). A step-by-step instruction is here:


Depending on the tooling you use, the support for PSF runtime from GUI may be also there, most of key players have already implemented it either way.

Expanding Marcin's answer, here is a link to my Microsoft Ignite 2018 talk where I demo exactly how you can fix such packages, using the free Express edition from Advanced Installer.


- MSIX & PSF video