5

我有一个 uwp 应用程序,使用 Visual Studio 2015 为 windows 10(多点触控等)设计,但它不能通过 Windows 应用商店发布(是的,它还包括一种“私人/隐藏”版本通过 Windows 商店)和通过 Powershell 安装对于普通客户来说有点复杂,所以我更喜欢一些好的旧 .exe 文件。

是否有可能将程序而不是 .appx 作为 .exe 导出/发布?

感谢任何支持:)

4

4 回答 4

5

简短的回答是你不能

本文所述

要销售您的通用 Windows 平台 (UWP) 应用程序或将其分发给其他用户,您需要为其创建一个 appxupload 包。创建 appxupload 时,将生成另一个 appx 包以用于测试和旁加载。您可以通过将 appx 包旁加载到设备来直接分发您的应用程序。

所以你只有三个选择:

  1. 创建包并将其上传到商店。
  2. 创建包并执行旁加载过程。
  3. 创建一个新的 WPF 应用程序,重用 UWP 的视图模型和逻辑/后端层。

您可能能够创建一个 powershell 脚本来尝试和自动化该过程(我从未尝试过),或者您自己的 WPF 中的应用程序来自动化它,但除此之外,截至今天没有其他官方选项可用。

于 2016-06-27T14:27:57.423 回答
3

可以使用名为Advanced Installer的工具来执行此操作。脚步

 1. Create a new Installer Project Professional.
 2. Select the files and folder option under Resources on the left side menu panel.
 3. Right click on Application Folder > Add Files. Add your certificate and appx file.
 4. Scroll down to Custom Actions tab under Custom Behavior on the left side menu panel.
 5. Under Custom Actions, add a powershell inline script.
 6. Write commands for installing the certificate and the extension. In parameter, pass 
    the certificate and appx file added to resources. Powershell commands-
    certutil -addstore "TrustedPublisher" "<path>\certificate.cer"
    Add-AppxPackage <path_to_appx_package>\uwpapp.appx
  7. Under Execution time select- "When the system is being modified"
  8. Under Execution options, select- Run with Local System with full previleges.
  9. Select Builds tab in Package Definition, 
  10. Under configuration, package type, select Single Exe Setup(With Resources).
  11. Right click on DefaultBuild and select build.This will generate an EXE file.
于 2019-04-11T11:38:44.433 回答
3

这不是一个完美的解决方案,但您可以尝试一下。

  1. 应用程序安装程序
  2. 或者为安装程序编写您自己的代码。检查这个答案。
于 2016-06-28T05:38:35.457 回答
2
  1. 您可以使用组策略侧载您的应用程序
  2. 你可以等待Windows 10周年更新,可以双击安装appx。
于 2016-06-28T06:14:30.097 回答