【问题标题】:make .exe file out of Visual Studio uwp .appx file从 Visual Studio uwp .appx 文件中制作 .exe 文件
【发布时间】:2019-04-11 23:52:27
【问题描述】:

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

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

感谢任何支持 :)

【问题讨论】:

标签: visual-studio-2015 uwp exe appx


【解决方案1】:

简短的回答是你不能

this article 所述:

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

所以你只有三个选择:

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

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

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      【解决方案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.
      

      【讨论】:

        【解决方案4】:
        1. 您可以使用Group Polices 旁加载您的应用程序
        2. 你可以等待Windows 10周年更新,可以双击安装appx。

        【讨论】:

        • 您知道周年纪念日预计何时可用吗? (我读到一些关于 7 月底的消息,但那不是正式发布日期)
        • @CMon 我没有正式发布日期,但营销版本是 1607,所以肯定是 7 月。我想这将是 7 月 29 日或接近周年纪念日
        猜你喜欢
        • 1970-01-01
        • 2018-01-04
        • 2018-09-13
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多