Need Help in Applying File Redirection Fixup in MSIX Packaging Tool

Copper Contributor

Hi Community Members!

 

I need some help here...

While trying to use the latest version of the MSIX Packaging Tool I am stuck at applying the file redirection fixup. The requirement is that I have to redirect the whole folder which is present in vfs/appdata.

 

I tried applying the same fixup using Advance Installer and it was a success. Please see below the config.json file generated by using Advance Installer...

 

Abhi211_0-1702311304069.png

 

Can someone please help me to implement the same using the MSIX Packaging tool?

Abhi211_1-1702311584994.pngAbhi211_2-1702311603764.png

 

Thank for the help in advance :)

@Tim Mangan @Bogdan Mitrache @Sushant_Bansal @fizaazmi could you please suggest something here. 

6 Replies
The new packaging tool has been setup to aid users create fixups related to specific entry points rather than wildcard executables, so suspect you would need to manage this directly by editing the config.json in the package editor after creating an initial fileredirection fixup. I also wonder whether you would need a Powershell Start Script to copy any captured VFS\Appdata to the MSIX Appdata folders.
Looks like I'm missing out I haven't seen the builtin psf (I've always done it manually).

I will say a couple things.
a) you shouldn't need a file fixup for appdata, writes will already be virtualized into the directory %localappdata%\packages\[packagename]\localcache

What I have seen quite often is if a directory already exists in appdata, it will leak outside the container and reuse the existing folder first.

ex. normal app uses:
%localappdata%\myapp

if that folder already exists, msix will happily use it, and nothing will populate in the localcache folder. (easy solution is to remove, or even move it to the localcache folder).

What you will find out really soon, is that files you put in the container appdata to customize the user config, aren't used/read in the package at all (unless it's normally read from the core install folder). So if you think you are adding in that special json config, or xml, or license file in appdata.. nope it won't read it. What you end up needing to do is have a launch script via psf that copies files from the container and psf does a nice job of at least providing that functionality.

Furthermore, anytime you do need psf for a write permission, it's so much faster (in my opinion) to use ILV

Outside of the <Applications> in the app manifest as direct child element to <Package> you can create an <Extensions> (not to be confused with the <Extensions> UNDER the <Applications>)
section like this:
<Extensions>
<uap10:Extension Category="Windows.InstalledLocationVirtualization">
<uap10:InstalledLocationVirtualization>
<uap10:UpdateActions ModifiedItems="keep" DeletedItems="reset" AddedItems="keep" />
</uap10:InstalledLocationVirtualization>
</uap10:Extension>
</Extensions>
bit for info here:
https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap10-updateacti...

@mattplan8 

In my VFS the issue is that I don't have localappdata folder instead it says only appdata so it is not reading those files from there. I tried copying those files manually to the "AppData\Local\Packages\App_Name\AppData" but still it is not reading the files... Any suggestions?

Have you tried setting the entry point on your main executable for the shortcut as per the new MSIX Packaging Tool GUI allows, as I had a similar experience with wildcards as per your advanced installer example until I combined copying my user settings in VFS\Profile using a Start script.

Hi @AppsPackG

 

I did try to copy the files using the script to userprofile but still it is not working. 

Hi @Abhi211 
Please find the attached example for applying File Redirection Fixup. 

Few points worth noting: 

  1. Default for any application's app data is under '%localappdata%\packages\[packagename]\localcache'
  2. The given configuration allows to redirect any package write operation under VFS/AppData folder, after application has been launched. 
  3. Appdata that was already captured during installation will not be redirected. To move such existing VFS/AppData, you will need to use PSF powershell script fixup.

 

fizaazmi_0-1705419928679.png