[英]How to allow a C# UWP app manage another UWP app?
I want to do some things, which I feel are very simple, but I cannot do.我想做一些事情,我觉得很简单,但我做不到。 I have looked at numerous websites and StackOverflow questions.
我查看了许多网站和 StackOverflow 问题。 One question has helped me a bit by pointing me in the right direction, but I feel I need more than just that.
一个问题给我指明了正确的方向,对我有所帮助,但我觉得我需要的不仅仅是这些。
Here is what I want to do (basically):这是我想做的(基本上):
UWP
app that can be managed by another app.UWP
应用程序。
.exe
file or .msi
file) for the installing app..exe
文件或.msi
文件)。 Not the .appinstaller
that visual studio 19 produces..appinstaller
。 Something like Inno Setup produces. Is any of this possible?这有可能吗?
If so, please give me some sample code/instructions/links.如果是这样,请给我一些示例代码/说明/链接。 I would be very thankful for any advice/points in the right direction as well!
我也将非常感谢您提供正确方向的任何建议/要点!
If not, please suggest what other language/framework I should use to accomplish these tasks (Is "tasks" the right word?).如果不是,请建议我应该使用什么其他语言/框架来完成这些任务(“任务”是正确的词吗?)。 I don't mind learning anything and have unlimited time.
我不介意学习任何东西并且有无限的时间。 Don't care about the learning curve either.
也不在乎学习曲线。 (If I need C++, I will do it. ONLY IF I NEED IT!!!)
(如果我需要 C++,我会做的。只有在我需要的时候才做!!!)
Thanks all!谢谢大家!
PS I know about WPF or WinForms. PS 我知道 WPF 或 WinForms。 I don't want to use them because of their age.
我不想使用它们,因为它们的年龄。
As the Rob Caplan said, PackManager class doesn't support uwp app, it is suitable for desktop app.正如 Rob Caplan 所说,PackManager class 不支持 uwp 应用程序,它适用于桌面应用程序。 So maybe you need to create a wpf app and use Desktop bridge to package it into uwp app so that you could use this api.
所以也许你需要创建一个 wpf 应用程序并使用桌面桥到 package 到 uwp 应用程序,这样你就可以使用这个 Z1A7A89AAZ72ED10564E。 In addition, you could find the sample here about installing appx package, its parent directory Windows-classic-samples/Samples/ also contains other samples you need, such as PackageManagerRemovePackage, etc, please check it.
另外,你可以在这里找到安装appx package的样例,它的父目录Windows-classic-samples/Samples/还有你需要的其他样例,如PackageManagerRemovePackage等,请查看。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.