简体   繁体   English

如何在C#安装程序中添加.msi文件

[英]How to add .msi files in the C# Installer

I am going to add speech recognition support to my existing C# desktop application written in C# .Net 3.5. 我将为我现有的用C#.Net 3.5编写的C#桌面应用程序添加语音识别支持。 I searched on the google and found that in order to able to run speech recognition, client system must have installed Microsoft speech Platform 11.0. 我在Google上搜索时发现,为了能够运行语音识别,客户端系统必须已安装Microsoft Speech Platform 11.0。 The speech platform is consists of 5 different .msi files. 语音平台由5个不同的.msi文件组成。 How can I include these five .msi files in my existing installer so that they install the required speech component along with my desktop application. 如何在我的现有安装程序中包含这五个.msi文件,以便它们将所需的语音组件与我的桌面应用程序一起安装。 Please suggest. 请提出建议。 Thanks in advance. 提前致谢。

You should say which tool you are using to build your base MSI setup. 您应该说出要用来构建基本MSI设置的工具。 If it's Visual Studio then prerequisites are customized using the Bootstrap Manifest Generator. 如果是Visual Studio,则使用Bootstrap清单生成器自定义先决条件。 However it's mostly fallen into obscurity since installer projects were taken out of Visual Studio and then added back as an externsion. 但是,由于安装程序项目已从Visual Studio中取出,然后又添加回了安装程序中,因此大多数情况都变得晦涩难懂。

You cannot install those speech MSI files from your installer class in a VS setup project. 您无法从VS安装项目中的安装程序类安装这些语音MSI文件。 Recursive MSI installs don't work, and that's one reason why there are bootstrapper programmers that build a prerequisite installer. 递归MSI安装不起作用,这就是为什么有引导程序程序员构建必备安装程序的原因之一。 In all cases you'll need to know things like the ProductCode of those speech MSIs so that they can be detected if they are already installed. 在所有情况下,您都需要了解诸如语音MSI的ProductCode之类的内容,以便可以检测到它们(如果已安装)。

In your position, and if you're using VS to build yoyur MSI file, I'd use WiX bootstrapper to mark those speech MSIs as prerequisite dependencies. 在您的位置上,如果您使用VS构建yoyur MSI文件,我将使用WiX引导程序将这些语音MSI标记为必备依赖项。 If you search you'll find examples like this: 如果您进行搜索,则会找到类似以下的示例:

http://www.c-sharpcorner.com/UploadFile/cb88b2/installing-prerequisites-using-wix-bootstrapper-project-and/ http://www.c-sharpcorner.com/UploadFile/cb88b2/installing-prerequisites-using-wix-bootstrapper-project-and/

http://neilsleightholm.blogspot.com/2012/05/wix-burn-tipstricks.html http://neilsleightholm.blogspot.com/2012/05/wix-burn-tipstricks.html

https://www.firegiant.com/wix/tutorial/net-and-net/bootstrapping/ https://www.firegiant.com/wix/tutorial/net-and-net/bootstrapping/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM