OneClick 应用程序部署问题
我们有一个 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定“获取此目录”是什么意思,但在 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...