在 MSI 中安装 .NET 服务以便其可更新的最佳方法?

发布于 2024-09-19 17:53:28 字数 542 浏览 4 评论 0原文

我有一个使用InstallShield 2009构建的MSI安装,它通过在包含服务exe的组件上将“.NET安装程序类”设置为“是”来安装.NET服务。 这个包含文件和 exe 的基本安装安装正常。我创建了一个小型更新 MSP,它正在更新原始安装中的服务 exe 文件。 当我在包含基本安装的系统上运行 MSP 时,出现错误 1001,因为它在小型更新 MSP 安装期间尝试重新安装服务。

Flexera对此问题的官方回应是,如果.NET可执行文件需要更新,那么应该将组件“.NET Installer Class”设置为No并创建自己的自定义操作。 Flexera 还承认,他们没有在任何地方记录如果将“.NET 安装程序类”设置为“是”,则无法创建安装的 MSP 更新。不可能返回并更改基本安装,因为它已经发布并且需要针对它创建更新。我自己想出了一个解决方法,在 MSP 更新中包含一个自定义操作,该操作会在安装 MSP 期间卸载该服务。这会安装小更新 MSP,但此解决方法不适用于从 ARP 卸载 MSP。

我需要知道在将来的安装中解决此问题的最佳方法。如何安装 .NET 服务,以便以后可以使用小型更新 MSP 轻松更新该服务?

I have a MSI install built with InstallShield 2009 which installs a .NET service by setting the ".NET Installer Class" to Yes on the component which contains the service exe.
This base install which contains files and the exe installs OK. I created a small update MSP which is updating the service exe file in the original install.
When I run the MSP on a system that contains the base install I get error 1001 because it is trying to reinstall the service during the small update MSP install.

Flexera's official response to this problem is that if the .NET executable needs to be updated, then one should set the component ".NET Installer Class" to No and create their own Custom Actions. Flexera also admitted that they do not document anywhere that if you set the ".NET Installer Class" to Yes that you cannot then create MSP updates of your install. It is impossible to go back and and change the base install since it has been released and the update needs to be created against it. I have on my own come up with a workaround by including a custom action in the MSP update which uninstalls the service during the install of the MSP. This gets the small update MSP installed but this workaround does not work for uninstalling the MSP from ARP.

I need to know the best way to address this issue in future installs. How do you install a .NET service in such a way where you can easily update the service later using a small update MSP?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南城旧梦 2024-09-26 17:53:28

服务应使用MSI方式安装;因为安装类非常脆弱,但自行编写的自定义操作不太可能好得多(只是更容易控制)。您可以在组件高级设置下找到服务选项。

Services should be installed using the MSI way; as intaller classes are horribly fragile, but self-written custom actions aren't likely to be a lot better (just easier to control). You can find the Service options under the component advanced settings.

当梦初醒 2024-09-26 17:53:28

最好的方法是使用 MS BITS(微软的后台智能传输服务),它类似于 Windows 更新。

当然,您的主应用程序必须能够使用此服务,因此我不确定这个答案是否适用于您的场景,除非您卸载当前应用程序并重新安装具有 BITS 支持的新版本。

有关 BITS 以及在 .NET 中使用它的更多信息

http://msdn.microsoft.com/en-us/library/aa362708(VS.85).aspx
http://msdn.microsoft.com/en-us/magazine/cc188766.aspx
http://www.codeproject.com/KB/IP/sharpBITS.aspx

The best way would be to use MS BITS (Microsoft's Background Intelligent Transfer Service) which is similar to Windows Update.

Of course your main app has to have the bility to use this service so I'm not sure if this answer will work in your scenario unless you uninstall the current app and re-install a new version with BITS support.

For more information on BITS and using it in .NET

http://msdn.microsoft.com/en-us/library/aa362708(VS.85).aspx
http://msdn.microsoft.com/en-us/magazine/cc188766.aspx
http://www.codeproject.com/KB/IP/sharpBITS.aspx
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文