Home

FileRedirection Redirection

%3CLINGO-SUB%20id%3D%22lingo-sub-360441%22%20slang%3D%22en-US%22%3EFileRedirection%20Redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-360441%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20using%20the%20FileRedirectionFixup%2C%20the%20C%2B%2B%20code%20modifies%20the%20path%20used%20in%2C%20lets%20say%20CreateFile%2C%20to%20something%20akin%20to%20%5C%5C%3F%5CC%3A%5CUsers%5Cusername%5CAppData%5CLocal%5CVFS%5C...%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBut%20then%20somewhere%20else%20below%20this%2C%20not%20in%20the%20Fixup%20and%20presumably%20in%20what%20I%20refer%20to%20as%20%22the%20MSIX%20Runtime%22%20for%20lack%20of%20a%20better%20name%2C%20this%20gets%20re-redirected%20to%20C%3A%5CUsers%5Cusername%5CAppData%5CLocal%5CPackages%5CPackagename%5CLocalCache%5CLocal%5CVFS%5C...%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20testing%2C%20I%20see%20this%20behavior%20affecting%20any%20redirected%20location%20that%20starts%20with%20C%3A%5CUsers%5Cusername%5CAppData%2C%20but%20not%20if%20redirection%20code%20retargets%20to%20other%20places%20I%20have%20tried.%20Can%20we%20get%20a%20clear%20definition%20on%20when%20such%20re-redirection%20occurs%20and%20if%20there%20is%20any%20control%20that%20may%20be%20applied%20to%20that%20behavior.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20I%20know%20I'm%20likely%20to%20be%20asked%20what%20the%20scenario%20is.%26nbsp%3B%20So%20here%20is%20why%20I%20need%20to%20know.%20Some%20applications%20write%20data%20and%20settings%20to%20locations%20in%20the%20user's%20roaming%20profile%20area%20so%20that%20these%20settings%20follow%20the%20user%20from%20machine%20to%20machine.%26nbsp%3B%20The%20current%20behavior%20re-redirects%20these%20settings%2Fdata%20to%20the%20package%20LocalCache%20folder%20which%20is%20destroyed%20as%20soon%20as%20the%20user%20logs%20off%20of%20a%20non-persistent%20VDI%20or%20RDSH%2FRDMI%20session.%26nbsp%3B%20This%20makes%20the%20app%20un-deployable%20in%20these%20environments%20via%20MSIX.%26nbsp%3B%20I%20would%20like%20to%20construct%20a%20fixup%20that%20would%20redirect%20to%20a%20more%20suitable%20place%2C%20a%20home%20drive%2C%20network%20share%2C%20or%20local%20cloud%20cache%20like%20OneDrive%20or%20ShareFile%20or%20whatever.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20we%20need%20to%20know%20more%20about%20this%20re-redirection%20so%20that%20we%20don't%20run%20afoul%20of%20it%20in%20attempts%20to%20make%20things%20work.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-381755%22%20slang%3D%22en-US%22%3ERe%3A%20FileRedirection%20Redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-381755%22%20slang%3D%22en-US%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%223%22%3EHi%20Tim%2C%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%223%22%3EAs%20always%20thanks%20for%20your%20feedback%20Tim.%20It%20is%20a%20missing%20feature%20that%20we%20captured.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%223%22%3EOne%20of%20the%20options%20we%20discussed%20today%20is%20to%20enable%20it%20by%20turning%20off%20the%20Copy%20on%20write%20OS%20redirection%20for%20newly%20created%20files%20in%20pre-defined%20selected%20locations.%20Then%20the%20fixup%20you%20created%20will%20not%20be%20overwritten%20and%20work%20well%20for%20the%20AppData%20roaming%20folder%20redirection.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%223%22%3EThanks!%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%223%22%3EVlad%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Tim Mangan
MVP

When using the FileRedirectionFixup, the C++ code modifies the path used in, lets say CreateFile, to something akin to \\?\C:\Users\username\AppData\Local\VFS\...

 

But then somewhere else below this, not in the Fixup and presumably in what I refer to as "the MSIX Runtime" for lack of a better name, this gets re-redirected to C:\Users\username\AppData\Local\Packages\Packagename\LocalCache\Local\VFS\...

 

In testing, I see this behavior affecting any redirected location that starts with C:\Users\username\AppData, but not if redirection code retargets to other places I have tried. Can we get a clear definition on when such re-redirection occurs and if there is any control that may be applied to that behavior. 

 

And I know I'm likely to be asked what the scenario is.  So here is why I need to know. Some applications write data and settings to locations in the user's roaming profile area so that these settings follow the user from machine to machine.  The current behavior re-redirects these settings/data to the package LocalCache folder which is destroyed as soon as the user logs off of a non-persistent VDI or RDSH/RDMI session.  This makes the app un-deployable in these environments via MSIX.  I would like to construct a fixup that would redirect to a more suitable place, a home drive, network share, or local cloud cache like OneDrive or ShareFile or whatever. 

 

So we need to know more about this re-redirection so that we don't run afoul of it in attempts to make things work.

1 Reply

Hi Tim,

 

As always thanks for your feedback Tim. It is a missing feature that we captured.

One of the options we discussed today is to enable it by turning off the Copy on write OS redirection for newly created files in pre-defined selected locations. Then the fixup you created will not be overwritten and work well for the AppData roaming folder redirection.

 

Thanks!

Vlad

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
description for autoplay blocking in settings page
HotCakeX in Discussions on
8 Replies