从Visual Studio uwp .appx文件中生成.exe文件

问题描述 投票:3回答:4

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

是否有可能导出/释放程序而不是.app as .exe?

Thx任何支持:)

visual-studio-2015 uwp exe appx
4个回答
4
投票

简短的回答是你不能。

正如this article所解释的那样:

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

所以你只有三个选择:

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

您可以创建一个powershell脚本来尝试自动化该过程(我从未尝试过这个),或者您自己的应用程序在WPF中实现自动化,但除此之外,目前还没有其他官方选项可用。


2
投票

可以使用名为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.

1
投票

它不是一个完美的解决方案,但你可以尝试这些。

  1. AppxInstaller
  2. 或者为安装程序编写自己的代码。检查this的答案。

1
投票
  1. 你可以使用Group Polices来加载你的应用程序
  2. 您可以等待Windows 10周年更新,可以双击安装appx。
© www.soinside.com 2019 - 2024. All rights reserved.