如何访问一个地铁应用程序的本地存储在一个桌面应用程序在Windows 8?
有一个API可用于该在.net中?那么在Windows API?如果没有,有没有人想出一些的hackish-办法做到这一点了吗?
Is there an API available for this in .Net? What about in the Windows API? If not, has anyone come up with some hackish-way to do this yet?
查找在Windows 8风格的应用程序的本地存储文件夹
Finding the local storage folder of a Windows 8 Style application
http://blog.falafel.com/Blogs/paul-tidwell/2012/08/27/finding-the-local-storage-folder-of-a-windows-8-style-application
该路径的Windows 8风格的应用程序如下:
The path to Windows 8 Style apps is as follows:
C:\用户\ {用户名} \应用程序数据\本地\包\ Microsoft.BingSports_8wekyb3d8bbwe
有一个新的Windows API,它使用内部和未公开的算法来创建一个出版商哈希,当其追加到包名变成了姓。姓看起来像 {包名称} _ {publisherhash}
There is a new Windows API which uses an internal and undisclosed algorithm to create a publisher hash, which when appended to the package name becomes the family name. Family name looks like {packagename}_{publisherhash}
如果你想其他桌面应用程序还是需要一些一套应用程序之间共享这个你可以通过调用PowerShell命令的API,像这样:
If you wanted another desktop application or need to share this between some set of applications you can call the API via PowerShell cmdlet like so:
(Get-AppxPackage -AllUsers -Name $name).PackageFamilyName
编写到注册表,瞧!您的应用程序可以使用Environment.UserName和路径上面的图案很容易地找到你的APPX本地存储。
Write that to the registry and voila! Your application can use Environment.UserName and the path pattern above to easily find your appx local storage.