如何在InstallShield 2013的安装程序中包含KB2670838? [英] How can I include KB2670838 in an installer with InstallShield 2013?

查看:233
本文介绍了如何在InstallShield 2013的安装程序中包含KB2670838?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用InstallShield 2013为需要 Windows平台更新KB2670838 .

I'm using InstallShield 2013 to make a Basic MSI installer for an application that requires Windows Platform Update KB2670838.

对于.NET框架和其他要求,我在可再发行部分"部分的InstallShield中选择它们. KB2670838不可用.

For .NET frameworks and other requirements, I select them in InstallShield in the Redistributables section. KB2670838 is not available.

如果我从Microsoft下载KB2670838,则会得到一个.msu文件.可以以某种方式将其包含在安装程序中,以便在需要时自动安装吗?如果不是,是否可以停止安装并告诉用户"KB2670838是必需的但尚未安装.请在此处获取..."?

If I download KB2670838 from Microsoft I get a .msu file. Can that be included in the installer somehow so that it automatically installs if needed? If not, is there a way to stop the install and tell the user that "KB2670838 is required but not installed. Get it here..."?

推荐答案

@Glytzhkof好点.那么,如何使InstallShield中止并给用户一个好消息,使他们知道该怎么办? – shoelzer 1小时前

然后,我将添加一个新答案-太长了,无法在评论中写.

I will just add a new answer then - too long to write in a comment.

  • 在更多信息"下找到需要扫描的文件详细信息 此kdb文章中的信息:文件信息": http://support.microsoft.com/kb/2670838/en
  • 选择一些要扫描的文件,然后在Installshield中添加为文件搜索(请参见下面的屏幕截图).您为每个文件(FILE1FOUND,FILE2FOUND,FILE3FOUND等)指定一个属性,如果搜索与文件详细信息(版本,大小,日期等)匹配,则该属性将设置为文件的完整路径.文件.否则,该属性未定义或设置为默认值(屏幕截图显示了预定义的搜索,而不是文件搜索,但是您知道了).
  • 最后,您添加 LaunchCondition 每个文件的条目,以确保您选择检查的所有文件都是正确的版本或更高版本.我想这是前提条件或类似条件中的-我不记得了.打开已编译的MSI,并检查它是否看起来像 LaunchConditon表.
  • Locate the file details you need to scan for under "For More Information : File Information" in this kdb article: http://support.microsoft.com/kb/2670838/en
  • Select a few files to scan for and add as file searches in Installshield (see below screenshot). You specify a property for each file (FILE1FOUND, FILE2FOUND, FILE3FOUND, etc...), and if the search matches the file details (version, size, date, etc...) the property is set to the full path of the file. Otherwise the property is undefined or set to a default value (screenshot shows predefined search, and not file search, but you get the idea).
  • Finally you add LaunchCondition entries for each file to ensure that all files you have selected to check are the correct version or higher. I guess this is in Prerequisites or similar - I can't recall. Open the compiled MSI and check that it looks like the LaunchConditon table.

作记录:(不属于上述建议)

我个人喜欢为这样的复杂逻辑编写一个脚本,以确保可以在MSI文件之外对逻辑进行整体检查并对其进行严格的测试.向此类代码添加注释以解释脚本正在检查的内容以及原因(帮助企业部署)也很好.可以直接在计算机上通过多个测试运行脚本,而无需重新编译MSI.如果逻辑很复杂,则可以节省大量时间.如果您编写一个已编译的dll,则可以显示一个消息框,并将Visual Studio调试器附加到msiexec.exe进程(客户端或服务器,取决于您的自定义操作在哪个上下文中运行),并逐步执行嵌入在MSI中的代码,但这似乎超出了您的方案范围.只想为其他可能会读到此内容的人提及它.另外,请查看Stefan Kruger的 installsite.com ,以获取有关复杂设置调试的更多信息像这样.

Personally I am in favor of coding a single script for complex logic like this to ensure the logic can be inspected as a whole and crucially tested as a whole outside the MSI file. It is also good to add comments to such code to explain what the script is checking, and why (helps corporate deployment). A script can be run through dozens of tests against the machine directly without recompiling the MSI. This can save a lot of time if the logic is complex. If you write a compiled dll you can show a message box and attach the visual studio debugger to the msiexec.exe process (client or server depending on what context your custom action is running in) and step-through the code whilst embedded in the MSI, but this seems out of scope for your scenario. Just want to mention it for other people who might read this. Also check Stefan Kruger's installsite.com for more information on complex setup debugging like this.

需要注意的一点是,通常不建议在脚本对系统进行更改的情况下使用脚本编制-如果有内置的MSI方法可以达到相同的结果.这样做的原因是,对机器进行更改的脚本将需要为其指定单独的回滚操作,以使MSI遵循最佳实践.要正确进行,这可能是大量工作和复杂性.上面的脚本只会检查系统条件,因此不需要回滚支持.

It is important to note that scripting is never generally recommended for scenarios where the script makes changes to the system - if there is a built-in MSI way to achieve the same result. The reason for this is that a script that makes changes to a machine will need a separate rollback-operation to be specified for it for the MSI to follow best practice. This can be a spectacular amount of work and complexity to get right. The above script would only check system conditions, so there is no need for rollback support.

这篇关于如何在InstallShield 2013的安装程序中包含KB2670838?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆