gpt4 book ai didi

powershell - 如何创建 Windows 安装程序

转载 作者:行者123 更新时间:2023-12-03 08:08:40 27 4
gpt4 key购买 nike

关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。

2年前关闭。




Improve this question




基本上,我们以手动安装程序(Windows powershell 脚本)的形式发布我们的更改/修复。它将通过读取配置文件值在特定位置安装指定的 .dll 和 SQL 脚本文件(我们将在此文件中配置 .dll 和 Sql 脚本位置)。相同的 powershell 脚本具有用于回滚特定更改集的卸载代码。

是否有任何选项或机制可以为上述要求创建 Windows 安装程序?

最佳答案

Short Version: Lots of answers already - I'll primarily just add some links toexisting answers. Here is a previous short answer of mine on thetopic.

Higher "glanceability": The above answer features a simpler format with a list view of the most important current deployment tools. In a rush? Test these, chose one. Below are more details and some further "discussion".



部署工具
有许多工具可用于创建 创建安装程序/setup.exe 文件 各种。以下是对其中大部分内容的简要说明的一些链接:
  • 非 MSI 安装程序工具 :http://www.installsite.org/pages/en/tt_nonmsi.htm
  • Windows 安装工具 : http://www.installsite.org/pages/en/msi/authoring.htm
  • 用于部署的系统管理工具:http://www.installsite.org/pages/en/msi/admins.htm (为了完整性,与您无关)
  • 更新 : 关于的话题多平台安装程序 :Does an universal cross-platform installer exists?

  • 我建议去MSI。具体使用什么工具不太明显 .有关不同工具的优点和缺点的描述,请参阅下面的最后一节。

    自动更新? : Various ways to create auto-updating packages .

    为什么选择微星?

    MSI (Windows Installer) is the standard for corporate deployment since it offers a number of corporate benefits ofmajor significance compared to previous installationtechnologies. The benefits center around reliable remotemanagement and standardization - crucial corporate deploymentconcerns.

    In brief the most important, specific benefits are probably:

    1. Reliable silent running (standardized & completely suppressible GUI)
    2. Implicitly available uninstall (a nightmare when dealing with legacy setups)
    3. Transparency (installer's semi-transparent and inspectable nature - except compiled CAs)
    4. Elevated installation rights (no messy temporary admin rights)
    5. Standardized command line (no hunting for "secret" switches)
    6. Administrative installation (file extract - essential for corporate repackaging)
    7. Verbose logging (helpful and verbose indeed :-) )
    8. Standardized package customization (transforms - database fragments)
    9. Rollback support (can undo changes for failed installs)
    10. Inventory (management and reporting: full registration of what is installed and where)
    11. Active Directory / GP integration

    Altogether this yields MSI's overall benefit: reliable, remotemanagement of deployment for busy system administrators in large,corporate environments. Crucial benefits, despite the technology'scomplexity and quirkiness.


    许多人发现该技术难以处理 - there are some common pitfalls (我写了 a very odd, ad-hoc description of some MSI anti-patterns towards the bottom here - 这个问题没有上下文,但确实存在 - 有时事情会在一时兴起,让写的人感到惊讶 - 不是很好,只是务实的细节。同样如此对于第一个链接)。
    The linked serverfault answer (上文和此处)对这些企业 MSI 优势进行了更详细的描述,以及需要注意的一些挑战。
    同样的服务器故障问题有 a second answer describing common design errors in MSI files .一个非常困惑的“脑残粉”。

    MSIX/AppX
    我要指出的是,微软现在的新打包平台是 MSIX基于 AppX 应用程序框架。然而 MSI 在企业部署领域具有很高的渗透率,因此 MSI 的相关性还有多久还有待观察。所有已建立的部署工具都在努力支持 MSIX 和 AppX 以及其他部署技术(还有虚拟化)。

    Slipping in some links:



    应用程序
    而在真实的企业界 AppV (应用虚拟化/应用流)变成了 a common deployment solution (蒂姆曼根的博客)。

    选择 MSI 工具
    MSI创建的行业领导者一般是 Advanced Installer , Installshield , PACE Suite ,以及开源解决方案 WiX (及其商业分支 Firegiant )-您似乎有些熟悉。
    我会给你一些以前写过的答案的链接,还有一些 意见和事实 在对这些不同工具的轻率混合中 - 它旨在作为“最大努力”帮助人们决定他们需要什么工具,而不声称是“正确的”。这始终是一项危险的努力——多年的经验意味着获得知识,但也预示着后天的坏习惯和怪癖。结果是一个有缺陷的专业人士的诚实意见,他只能提供帮助:
  • What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc - 对当前建立的部署产品的优势和劣势进行客观评估的主观尝试。
  • Quick start for WiX - 一个凌乱的小答案,其中包含有关如何使用 WiX 开始运行的建议,该答案比平时更多。它一定很有帮助。我喜欢“ hello world ”样式示例,我链接到其他人也提到的 codeproject 上。
  • Windows Installer and the creation of WiX (关于 WiX 如何产生及其工作方式的快速和非官方概述。也是“不可避免的部署复杂性”的一部分)。
  • How can I compare the content of two (or more) MSI files? (有关 MSI 格式的一些简要信息,如何检查 MSI 文件以及如何使用免费工具检索和检查其中的内容)。
  • How do I avoid common design flaws in my WiX / MSI deployment solution? (关于如何避免基于 MSI 的部署解决方案中出现问题的一些善意但凌乱的建议)。
  • 关于powershell - 如何创建 Windows 安装程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49624070/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com