简体   繁体   English

在我的安装项目中包含另一个MSI文件

[英]Include another MSI file in my setup project

I'm trying to make a setup program for an ASP.NET web site. 我正在尝试为ASP.NET网站制作安装程序。 I need to make sure the target machine has sqlxml installed. 我需要确保目标机器已安装sqlxml。

I must verify the target machine has the software installed, and if not, launch a .msi file either before or after the main installation. 我必须验证目标计算机是否已安装该软件,如果没有,请在主安装之前或之后启动.msi文件。

I'm a complete newbie with setup projects, so maybe this is obvious, but after several hours browsing the web I haven't found a satisfactory solution. 我是一个完整的新手与安装项目,所以也许这是显而易见的,但在浏览网络几个小时后,我没有找到一个满意的解决方案。 I've been reading about WiX , etc. but I'm looking (if possible) for a simple solution. 我一直在阅读有关WiX等的内容,但我正在寻找(如果可能的话)一个简单的解决方案。


Thank you both! 谢谢你们俩!

I understand an installer can't run another one. 我知道安装程序无法运行另一个安装程序。 I was thinking in a functionality similar to Prerequisites (in project properties). 我在思考类似于先决条件的功能(在项目属性中)。 There I can check a component and it will be automatically installed if it isn't. 在那里,我可以检查一个组件,如果没有,它将自动安装。 I don't need to do anything else. 我不需要做任何其他事情。 But, the most important thing for me is that the installation won't run if it's not needed. 但是,对我来说最重要的是,如果不需要,安装将无法运行。

I also tried the .msm solution, but I couldn't find any. 我也试过.msm解决方案,但我找不到。 Maybe I can make one myself? 也许我可以自己做一个? I haven't tried it yet though. 我还没有尝试过。

Unfortunately, you can't run one installer from another, since only one can be running at a time. 遗憾的是,您无法从另一个安装程序运行一个安装程序,因为一次只能运行一个安装程序。 You need to chain them together and run one after the other. 你需要将它们链接在一起并一个接一个地运行。 Google "msi chaining". 谷歌“msi链接”。 This is often the reason why products like Visual Studio use an external setup.exe which then runs the installers one after the other. 这通常是为什么像Visual Studio这样的产品使用外部setup.exe然后依次运行安装程序的原因。

Looks like you need to 'chain' the installs http://objectmix.com/xml-soap/84668-installing-sqlxml-net-app.html 看起来你需要“链接”安装http://objectmix.com/xml-soap/84668-installing-sqlxml-net-app.html

You can get the redist here http://www.microsoft.com/downloads/details.aspx?FamilyID=51D4A154-8E23-47D2-A033-764259CFB53B&displaylang=en 你可以在这里获得redist http://www.microsoft.com/downloads/details.aspx?FamilyID=51D4A154-8E23-47D2-A033-764259CFB53B&displaylang=en

CAn you add this as a pre-req for your install? 您是否将此添加为安装的预先请求? What are you using to build the create the install? 你用什么来构建创建安装?

Edit: 编辑:
I had a look to see how you can check of the SQLXML is installed and come across this: 我看看如何检查SQLXML是否已安装并遇到此问题:
http://www.tech-archive.net/Archive/SQL-Server/microsoft.public.sqlserver.xml/2005-04/msg00110.html http://www.tech-archive.net/Archive/SQL-Server/microsoft.public.sqlserver.xml/2005-04/msg00110.html

The system I am on just now has the following key HKEY_CLASSES_ROOT \\ SQLXMLX (note the X at the end), so you might need to do a bit more investigation in to what the actual key is. 我刚刚使用的系统有以下密钥HKEY_CLASSES_ROOT \\ SQLXMLX(注意结尾处的X),因此您可能需要对实际密钥进行更多调查。

I'm not familer with Visual Studio install authoring but if you can add an entry to the AppSearch and RegLocator tables you should be able to check for the existance of the registry key when the install starts. 我并不熟悉Visual Studio安装创作,但如果您可以向AppSearch和RegLocator表添加条目,则应该能够在安装开始时检查注册表项是否存在。 See here 看这里
http://msdn.microsoft.com/en-us/library/aa371564(VS.85).aspx http://msdn.microsoft.com/en-us/library/aa371564(VS.85).aspx

The Reglocator table gives you the option to set a property with a value from the registry if found. Reglocator表为您提供了使用注册表中的值设置属性的选项(如果找到)。 You can then use this in the condition on a custom action. 然后,您可以在自定义操作的条件中使用它。

A lot to put together, but I hope it move you in the right direction. 很多东西放在一起,但我希望它能让你朝着正确的方向前进。

Brent's answer is correct. 布伦特的回答是正确的。 I would just add that, sometimes, you can find a "merge module" for the bits you depend on. 我想补充一点,有时,你可以找到你所依赖的位的“合并模块”。 That's a .msm file. 这是一个.msm文件。 You can certainly include 1 or more of those in your .msi file. 您当然可以在.msi文件中包含一个或多个。 I have no idea whether a merge module is available for SQLXML. 我不知道合并模块是否可用于SQLXML。 Sorry. 抱歉。

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

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