Write to non virtualized %APPDATA% location from MSIX installed binary

%3CLINGO-SUB%20id%3D%22lingo-sub-1512850%22%20slang%3D%22en-US%22%3EWrite%20to%20non%20virtualized%20%25APPDATA%25%20location%20from%20MSIX%20installed%20binary%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1512850%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20there%20any%20way%20to%20write%20files%20to%20the%20%22real%22%20%25APPDATA%25%20location%20from%20a%20binary%20that%20is%20installed%20via%20an%20MSIX%20installer%3F%20I.e.%20I%20would%20like%20to%20write%20a%20file%20to%20such%20a%20location%20in%20such%20a%20way%20that%20it%20is%20visible%20to%20any%20other%20program%20that%20is%20installed%20on%20my%20system.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20background%20for%20this%20is%20as%20follows%3A%20I'm%20trying%20to%20create%20an%20MSIX%20installer%20for%20the%20Julia%20programming%20language.%20One%20very%2C%20very%20key%20feature%20is%20integration%20with%20Jupyter%20clients.%20The%20way%20programming%20languages%20integrate%20with%20Jupyter%20clients%20is%20that%20the%20programming%20language%20should%20write%20some%20files%20into%20the%20folder%26nbsp%3B%3CSPAN%3E%25APPDATA%25%5Cjupyter%5Ckernels%2C%20and%20then%20Jupyter%20clients%20read%20those%20files%20to%20integrate%20the%20programming%20language%20into%20their%20UI.%20You%20can%20read%20the%20spec%20for%20the%20Jupyter%20side%20of%20things%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fjupyter-client.readthedocs.io%2Fen%2Fstable%2Fkernels.html%23kernel-specs%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fjupyter-client.readthedocs.io%2Fen%2Fstable%2Fkernels.html%23kernel-specs%3C%2FA%3E.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20problem%20I'm%20running%20into%20now%20is%20that%20my%20MSIX%20installed%20Julia%20version%20can%20try%20to%20write%20the%20necessary%20files%20into%20the%26nbsp%3B%25APPDATA%25%5Cjupyter%5Ckernels%20folder%2C%20but%20any%20Jupyter%20clients%20won't%20see%20those%20files%20because%20in%20truth%20the%20files%20of%20course%20were%20not%20written%20to%26nbsp%3B%25APPDATA%25%5Cjupyter%5Ckernels%2C%20but%20the%20virtualized%20location%20for%20Julia...%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EIs%20there%20any%20way%20around%20this%3F%20What%20I%20really%20need%20is%20some%20way%20to%20say%2C%20from%20the%20Julia%20binary%2C%20%22Hey%2C%20I%20need%20to%20write%20some%20files%20into%20the%20folder%26nbsp%3B%25APPDATA%25%5Cjupyter%5Ckernels%2C%20the%20real%20one%2C%20not%20a%20virtualized%20one%22.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EGiven%20how%20popular%20and%20central%20Jupyter%20is%20to%20the%20whole%20data%20science%20ecosystem%2C%20it%20would%20be%20really%20good%20if%20there%20was%20some%20way%20to%20solve%20this...%20If%20nothing%20else%2C%20maybe%20MS%20could%20add%20a%20hard%20exception%20to%20the%20folder%20%60%25APPDATA%25%5Cjupyter%5Ckernels%60%20to%20not%20virtualize%20that%20specific%20location%20ever%2C%20for%20any%20app%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1514789%22%20slang%3D%22en-US%22%3ERe%3A%20Write%20to%20non%20virtualized%20%25APPDATA%25%20location%20from%20MSIX%20installed%20binary%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1514789%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F693020%22%20target%3D%22_blank%22%3E%40davidanthoff%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%20there%20is.%20Check%20out%20the%20following%20article%20from%20Advanced%20Installer%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.advancedinstaller.com%2Fmsix-disable-registry-file-redirection.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.advancedinstaller.com%2Fmsix-disable-registry-file-redirection.html%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20keep%20in%20mind%20that%20packages%20created%20this%20way%20can%20not%20be%20directly%20installed%20nor%20can%20the%20deployed%20through%20the%20Microsoft%20Store.%20But%20you%20can%20install%20them%20using%20command%20line%20or%20an%20MDM%20solution.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1521801%22%20slang%3D%22en-US%22%3ERe%3A%20Write%20to%20non%20virtualized%20%25APPDATA%25%20location%20from%20MSIX%20installed%20binary%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1521801%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F69449%22%20target%3D%22_blank%22%3E%40Hauke%20Hasselberg%3C%2FA%3E%26nbsp%3BThanks%2C%20interesting!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20for%20us%20then%20the%20question%20is%20whether%20we%20might%20get%20permission%20from%20MS%20for%20the%20store%20to%20have%20the%26nbsp%3BunvirtualizedResources%20capability...%20Python%20has%20it%2C%20and%20Julia%20as%20a%20product%20seems%20to%20be%20in%20exactly%20the%20same%20category%2C%20so%20maybe%20there%20is%20hope%3F%20Has%20anyone%20had%20experience%20with%20store%20submissions%20that%20require%20that%3F%20Is%20there%20someone%20from%20MS%20who%20could%20work%20with%20us%20pre%20store%20submission%20on%20this%2C%20or%20is%20the%20right%20strategy%20to%20just%20submit%20to%20the%20store%20and%20hope%20for%20the%20best%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1522049%22%20slang%3D%22en-US%22%3ERe%3A%20Write%20to%20non%20virtualized%20%25APPDATA%25%20location%20from%20MSIX%20installed%20binary%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1522049%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F693020%22%20target%3D%22_blank%22%3E%40davidanthoff%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYes%2C%20you%20can%20request%20approval%20when%20submitting%20your%20package%20and%20explain%20why%20Julia%20needs%20it%20and%20is%20in%20the%20same%20category%20as%20Python.%20The%20process%20is%20outlined%20here%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fuwp%2Fpackaging%2Fapp-capability-declarations%23restricted-capabilities%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fuwp%2Fpackaging%2Fapp-capability-declarations%23restricted-capabilities%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20also%20get%20approval%20before%20you're%20submitting%20your%20app%20which%20is%20probably%20the%20better%20option%20in%20your%20case%2C%20the%20page%20says%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%22%3CSPAN%3ETo%20do%20so%2C%20visit%20the%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdeveloper.microsoft.com%2Fwindows%2Fsupport%22%20data-linktype%3D%22external%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EWindows%20Developer%20support%20page%3C%2FA%3E%3CSPAN%3E.%20Select%20Developer%20support%20topic%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EDashboard%20issue%3C%2FSTRONG%3E%3CSPAN%3E%2C%20Issue%20Type%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EApp%20submissions%3C%2FSTRONG%3E%3CSPAN%3E%2C%20and%20Subcategory%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EOther%3C%2FSTRONG%3E%3CSPAN%3E.%20Then%20describe%20how%20you%20are%20using%20the%20capability%20and%20why%20it%20is%20necessary%20for%20your%20product.%20If%20you%20do%20not%20provide%20all%20the%20information%20necessary%2C%20your%20request%20will%20be%20denied.%20You%20may%20also%20be%20asked%20to%20provide%20more%20information.%20Note%20that%20this%20process%20typically%20takes%205%20business%20days%20or%20longer%2C%20so%20please%20submit%20your%20request%20well%20in%20advance.%22%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ECheers%2C%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ETanaka%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Is there any way to write files to the "real" %APPDATA% location from a binary that is installed via an MSIX installer? I.e. I would like to write a file to such a location in such a way that it is visible to any other program that is installed on my system.

 

The background for this is as follows: I'm trying to create an MSIX installer for the Julia programming language. One very, very key feature is integration with Jupyter clients. The way programming languages integrate with Jupyter clients is that the programming language should write some files into the folder %APPDATA%\jupyter\kernels, and then Jupyter clients read those files to integrate the programming language into their UI. You can read the spec for the Jupyter side of things at https://jupyter-client.readthedocs.io/en/stable/kernels.html#kernel-specs.

 

The problem I'm running into now is that my MSIX installed Julia version can try to write the necessary files into the %APPDATA%\jupyter\kernels folder, but any Jupyter clients won't see those files because in truth the files of course were not written to %APPDATA%\jupyter\kernels, but the virtualized location for Julia...

 

Is there any way around this? What I really need is some way to say, from the Julia binary, "Hey, I need to write some files into the folder %APPDATA%\jupyter\kernels, the real one, not a virtualized one".

 

Given how popular and central Jupyter is to the whole data science ecosystem, it would be really good if there was some way to solve this... If nothing else, maybe MS could add a hard exception to the folder `%APPDATA%\jupyter\kernels` to not virtualize that specific location ever, for any app?

3 Replies
Highlighted

@davidanthoff 

Yes there is. Check out the following article from Advanced Installer:

https://www.advancedinstaller.com/msix-disable-registry-file-redirection.html

 

Please keep in mind that packages created this way can not be directly installed nor can the deployed through the Microsoft Store. But you can install them using command line or an MDM solution.

Highlighted

@Hauke Hasselberg Thanks, interesting!

 

I think for us then the question is whether we might get permission from MS for the store to have the unvirtualizedResources capability... Python has it, and Julia as a product seems to be in exactly the same category, so maybe there is hope? Has anyone had experience with store submissions that require that? Is there someone from MS who could work with us pre store submission on this, or is the right strategy to just submit to the store and hope for the best?

Highlighted

Hi @davidanthoff,

 

Yes, you can request approval when submitting your package and explain why Julia needs it and is in the same category as Python. The process is outlined here - https://docs.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations#restricted-capabi....

 

You can also get approval before you're submitting your app which is probably the better option in your case, the page says

 

"To do so, visit the Windows Developer support page. Select Developer support topic Dashboard issue, Issue Type App submissions, and Subcategory Other. Then describe how you are using the capability and why it is necessary for your product. If you do not provide all the information necessary, your request will be denied. You may also be asked to provide more information. Note that this process typically takes 5 business days or longer, so please submit your request well in advance."

 

Cheers,

Tanaka