wix - 在捆绑链执行结束时运行 PowerShell 脚本
问题描述
我正在使用 Wix Bootstrapper 创建一个 exe 安装程序。
在捆绑链中,我正在安装一些 exe 文件。
最后我想执行一个 PowerShell 脚本来做一些额外的任务。这怎么可能
这是捆绑链,我已经提到要在哪里执行 PowerShell 脚本。
<Bundle Name="sample" Version="0.0.0.0" Manufacturer="$(var.Manufacturer)" UpgradeCode="fsfsddssdsdsd">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<ExePackage
SourceFile="something.exe"
InstallCommand="/install /quiet /norestart"
PerMachine="yes" >
</ExePackage>
<ExePackage
SourceFile="anything.exe"
InstallCommand="/install /quiet /norestart"
PerMachine="yes" >
</ExePackage>
**EXECUTE POWERSHELL SCRIPT HERE**
</Chain>
</Bundle>
提前感谢您的帮助
解决方案
我现在可以看到两个选项:
- 创建正在做所有事情的 msi。
您可以按照此处所述运行 powershell 脚本
- 创建您自己的引导程序应用程序,该应用程序将在安装所有 exe 后运行脚本。我记得这个案子有一个特殊的事件。
在这里您可以找到关于它的精彩文章 (C#)。你也可以很容易地找到如何使用 C++ 来做到这一点。
推荐阅读
- c# - 如何在 C#(Aspose)中设置 PPT 中的图像位置和图像大小?
- python - 基于计数器在Django中动态创建新URL
- python-3.x - 安装构建依赖项时出现spacy安装错误
- c# - 在 C# .net 或 .netcore 中以编程方式比较 sql 数据库模式的方法
- r - 如何使用基本 R 函数对多个变量的数据框进行排序,这些变量的名称在向量中给出?
- google-sheets - 将合并的 Google 表格拆分为每人单独的表格
- netty - 如何在整个“会话”中保持 Netty NIODatagram 通道打开
- typescript - Vue.js 自定义指令使用 TypeScript 检测点击外部元素
- html - Htaccess 语言重写规则给出错误 500
- sql-server - 从项目文件夹中获取 database.mdf 的直接路径 - 文件已移动