UWP 桌面桥接器本地应用程序数据虚拟化文件夹位置 [英] UWP Desktop Bridge & Local App Data virtualized folder location

查看:29
本文介绍了UWP 桌面桥接器本地应用程序数据虚拟化文件夹位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Desktop Bridge"转换工具将 Win32 应用(Zoom Player)转换为 UWP AppX 模型.

I am in the process of converting a Win32 app (Zoom Player) to the UWP AppX model using the "Desktop Bridge" conversion tool.

在Windows VISTA引入的文件夹模型下,不需要创建/写入权限的应用程序文件安装在Program Files"文件夹下,需要创建/写入权限的文件安装在LocalAppData 文件夹(使用 调用SHGetKnownFolderPath"WinAPI 函数时的C:\Users\bLight\AppData\Local"FOLDERID_LocalAppData 参数).

Under the folder model introduced in Windows VISTA, the application's files that do not require create/write access are installed under the "Program Files" folder and files that require create/write access are Installed under the LocalAppData folder ("C:\Users\bLight\AppData\Local" when calling the "SHGetKnownFolderPath" WinAPI function with the FOLDERID_LocalAppData parameter).

我的问题是 Desktop Bridge 创建的 AppX 文件将安装程序要安装的文件安装到FOLDERID_LocalAppData"(C:\Users\bLight\AppData\Local\Zoom Player) 在这里:

My problem is the AppX file created by Desktop Bridge installs the files the installer targeted for installation to "FOLDERID_LocalAppData" (C:\Users\bLight\AppData\Local\Zoom Player) here:

C:\Program Files\WindowsApps\ZoomPlayer_12.5.0.0_x86__63ghcm0aqanjp\VFS\Users\ContainerAdministrator\AppData\Local\Zoom Player

并且在运行安装的应用程序之后任何后续的读取或写入尝试都被重定向到:

And any subsequent read or write attempts after running the installed App are redirected to :

c:\users\bLight\appdata\local\packages\zoomplayer_63ghcm0aqanjp\LocalCache\Local\Zoom Player

这意味着无法访问已安装的文件.

This means the installed files can not be accessed.

安装程序和 Win32 应用程序都使用具有相同参数的SHGetKnownFolderPath"来检索本地 AppData 文件夹.

Both the installer and the Win32 app use "SHGetKnownFolderPath" with the same parameters to retrieve the Local AppData folder.

有什么想法可以解决这个问题吗?

Any ideas how I can resolve this?

推荐答案

有什么想法可以解决这个问题吗?

Any ideas how I can resolve this?

转换后,AppData 被重定向到本地应用数据存储,这是每个 UWP 应用的私有存储.

After conversion, AppData is redirected to the local app data store, which is a private store for each UWP app.

请注意这种情况:您的应用写入应用的安装目录.例如,您的应用程序写入与您的 exe 放在同一目录中的日志文件.这不受支持,因此您需要找到其他位置,例如本地应用数据存储.

Please notice this scenario: Your app writes to the install directory for your app. For example, your app writes to a log file that you put in the same directory as your exe. This isn't supported, so you'll need to find another location, like the local app data store.

请参阅准备桌面应用以转换为 UWP 部分rel="nofollow noreferrer">这里

See Prepare your desktop app for conversion to UWP section in here

----------------更新 1----------------

----------------Update 1----------------

Rob 为您的 MSDN 问题

引用:

AppX 安装程序是否无法自动将某些文件放入本地应用程序数据文件夹中?

Is it impossible for the AppX installer to automatically place some files into the local app data folder?

是的.推荐的模式是将模板文件包含在安装包中,然后在首次使用时将它们复制到本地应用程序数据文件夹中.安装应用程序包后,它只是复制到系统中.它不运行任何初始化代码.它不知道哪些用户将运行该应用程序并且无权访问他们的用户数据.如果第二个用户安装了该应用,则该用户将获得对已安装应用的引用,并且不会复制或安装任何新应用.

普通的 Win32 安装程序不仅将文件放入Program Files"文件夹,还将可编辑文件放入Local AppData"文件夹

A normal Win32 installer doesn't only place files into the "Program Files" folder, it places editable files into the "Local AppData" folder

这似乎是一个问题场景,我们会通知相关团队进行检查并完善文档.

This seems a problem scenario, we will notice the related team to check it and refine the document.

这篇关于UWP 桌面桥接器本地应用程序数据虚拟化文件夹位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆