OneClick 应用程序部署问题

发布于 2024-12-26 16:09:18 字数 727 浏览 4 评论 0原文

我们有一个 WPF oneclick 应用程序,其中有从 Web 服务器更新的内容,并且文件被复制到应用程序内容目录中。

似乎有一个目录是从中读取内容的目录,但我找不到它。我可以通过应用程序变量找到两个目录: AppDomain.CurrentDomain.BaseDirectory System.Deployment.Application.ApplicationDeployment.CurrentDeployment.DataDirectory

第一个给出了此目录: %USER_DIR%\AppData\Local\Apps\2.0\Z7CC6XEX.WZ6\AMHN5JKE.24H\gear..tion_58b3e06760c5809e_0001.0000_8bdd947f29008ffc

第二个给出此目录: %USER_DIR%\AppData\Local\Apps\2.0\Data\DCTM6YKT.LZQ\EOCXOVVB.VJC\gear..tion_58b3e06760c5809e_0001.0000_8bdd947f29008ffc\Data

我感兴趣的目录是这样的: %USER_DIR%\AppData\Local\Apps\2.0\Z7CC6XEX.WZ6\AMHN5JKE.24H\gear...exe_58b3e06760c5809e_0001.0000_none_ee6c716212f37acf

我已经查看了所有应用程序变量,但找不到获取此目录的方法。

有谁知道我如何获得这个目录以及为什么它不同?

We have a WPF oneclick application where we have content that is updated from the web server and the files are copied into the application content directories.

It seems that there is a directory that is where content is read from but I can't find it. There seems to be 2 directories that I can find through application variables:
AppDomain.CurrentDomain.BaseDirectory
System.Deployment.Application.ApplicationDeployment.CurrentDeployment.DataDirectory

The first one gives this directory:
%USER_DIR%\AppData\Local\Apps\2.0\Z7CC6XEX.WZ6\AMHN5JKE.24H\gear..tion_58b3e06760c5809e_0001.0000_8bdd947f29008ffc

The second one gives this directory:
%USER_DIR%\AppData\Local\Apps\2.0\Data\DCTM6YKT.LZQ\EOCXOVVB.VJC\gear..tion_58b3e06760c5809e_0001.0000_8bdd947f29008ffc\Data

The directory I am interested in is this:
%USER_DIR%\AppData\Local\Apps\2.0\Z7CC6XEX.WZ6\AMHN5JKE.24H\gear...exe_58b3e06760c5809e_0001.0000_none_ee6c716212f37acf

I've looked through all the application variables, and can't find a way to get this directory.

Does anyone know how I can get this directory and why it is different?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半世蒼涼 2025-01-02 16:09:18

不确定“获取此目录”是什么意思,但在 Win 7 上此目录位于 C:\Users\User\AppData\Local\Apps\2.0\Data

但是,您最好的选择,IMO ,就是在 %APPDATA% 文件夹中为您的应用程序创建一个目录并将您的内容存储在那里......

Not sure what you mean by "get this directory" but on Win 7 this dir is located at C:\Users\User\AppData\Local\Apps\2.0\Data

Howerver, your best option, IMO, is to just create a dir for your app in %APPDATA% folder and store your content there...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文