InstallShield 与 .NET 4.5 嵌套安装 [英] InstallShield with .NET 4.5 nested installation

查看:28
本文介绍了InstallShield 与 .NET 4.5 嵌套安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的安装程序需要重新分发 .NET 框架,但我不想有 setup.exe 包装器,所以我编写了一个自定义操作来启动 .NET 的网络安装程序,如果最终用户机器没有已经有了.这在 .NET 4.0 和 .NET 3.5 上工作得很好,但对于 .NET 4.5,.NET 安装程序报告正在等待另一个安装完成"并失败 - 如果我的自定义操作在 Exec 序列中,则此错误消息将是正确的,但是我特意把它放在 UI 序列的早期,以允许嵌套安装.

My installer needs to redistribute the .NET framework, but I don't want to have a setup.exe wrapper so I've written a Custom Action to launch the web installer for .NET if the end-users machine does not already have it. This works perfectly fine with .NET 4.0 and .NET 3.5 but for .NET 4.5 the .NET installer reports "waiting for another install to complete" and fails - this error msg would be correct if my Custom Action was in the Exec sequence, but I specifically placed it very early in the UI sequence to allow for a nested installation.

完全相同的 InstallShield 配置/代码适用于 .NET 3.5 和 .NET 4.0,但适用于 .NET 4.5,我使用的是 Microsoft 的标准 Web 安装程序:http://www.microsoft.com/en-ca/download/details.aspx?id=30653

The exact same InstallShield configuration/code works fine with .NET 3.5 and .NET 4.0 but fails with .NET 4.5, I'm using the standard web installer from Microsoft: http://www.microsoft.com/en-ca/download/details.aspx?id=30653

有没有人知道这个问题的任何解决方案或解决方法?

Does anyone know of any solution or workaround to this problem ?

这是我的自定义操作的代码:

Here's the code for my Custom Action:

if ( hasDotNET45 = FALSE ) then
    MessageBox( "Missing .NET 4.5 framework!", INFORMATION );
    LAAW_SHELLEXECUTEVERB = "runas";
    LaunchApplication( szSupportDir^"\dotNetFx45_Full_setup.exe", "", "", SW_SHOWNORMAL, 100000, LAAW_OPTION_USE_SHELLEXECUTE | LAAW_OPTION_WAIT_INCL_CHILD );
    Delay( 333 );
endif;

推荐答案

解决方案是首先使用以下命令提取 .NET 4.5 安装程序可执行文件的内容:dotnetfx45_full_x86_x64.exe/x

The solution is to first extract the contents of the .NET 4.5 installer executable using the command: dotnetfx45_full_x86_x64.exe /x

然后我可以在我的 UI 序列中使用自定义操作来调用 .NET 安装程序的 .MSI 版本(没有它的 setup.exe 包装器!)

Then I can use a Custom Action in my UI sequence to invoke the .MSI version of the .NET installer (without it's setup.exe wrapper!)

msiexec.exe/i netfx_Full_x64.msi EXTUI=1/l*v 安装日志"

这完全解决了我原来的问题.

This fully resolves my original question.

这篇关于InstallShield 与 .NET 4.5 嵌套安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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