可以使用单个 MSI 进行 .NET Bootstrap 安装吗? [英] .NET Bootstrap Installation with an single MSI possible?

查看:26
本文介绍了可以使用单个 MSI 进行 .NET Bootstrap 安装吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个安装程序来安装我的 .NET 应用程序.现在我想在必要时预安装 .NET Framework.这不是什么大不了的事.重要的是,必须有一个没有 EXE 作为引导程序的 MSI.这可能吗?

I've written an Installer for installing my .NET application. Now I'd like to pre install .NET Framework if necessary. That is not the big deal. The big deal is, there have to be a single MSI without an EXE as a bootstrapper. Is this possible?

推荐答案

Windows Installer 有几个互斥锁可以防止这种情况发生.第一个对每台机器强制执行一个序列,第二个对每个进程强制执行一个 UI 序列.

Windows Installer has a couple of mutexs at play here that prevent this. The first enforces one execute sequence per machine and the second enforces one UI sequence per process.

技术上可以让 UI 序列中的自定义操作生成一个新进程并在该上下文中安装 .NET.但是,这不是最佳实践,您将失去静默安装 MSI 的能力.您能做的最好的事情是安装/QR(简化的 UI).

It is technically possible to have a custom action in the UI sequence spawn a new process and install .NET in that context. However, this is not a best practice and you'll lose the ability to install your MSI silently. The best you would be able to do is a /QR (Reduced UI) installation.

我感觉到你的痛苦.我最近一直在做的事情(尽可能)是将我的 .NET 应用程序定位为 .NET 2.0,并提供一个 app.config,说明支持 CLR 4.0 并使用旧版激活.这为我提供了一个针对最小公分母及以上的应用程序.然后我在我的 MSI 中放置了一个启动条件来检查 .NET 2.0 或更高版本.

I feel your pain. What I've been doing lately (wherever possible) is target my .NET application for .NET 2.0 and provide an app.config that says CLR 4.0 is supported and to use legacy activation. This gives me an app targeted for the least common denominator and beyond. I then put an launch condition in my MSI that checks for .NET 2.0 or greater.

基本上,我觉得 Windows XP/Server 2003 是个恐龙,如果客户仍然想运行它,他们可以自己安装 .NET.Windows Vista 及更高版本具有 .NET 3.0 或更高版本.

Basically, I feel that Windows XP / Server 2003 is a dinosaur and if a customer still wants to run it they can install .NET themselves. Windows Vista and beyond has .NET 3.0 or greater.

这篇关于可以使用单个 MSI 进行 .NET Bootstrap 安装吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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