一个人如何停止Windows服务来进行升级安装? [英] How does one stop a Windows service to do an upgrade install?

查看:303
本文介绍了一个人如何停止Windows服务来进行升级安装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾与使用Visual Studio 2008。当我做一个升级安装,我得到以下警告安装项目开发以及在Windows服务:

I have developed a Windows service along with a setup project using Visual Studio 2008. When I do an upgrade install I get the following warning:

以下应用程序使用的安装程序必须更新的文件。您可以关闭该应用程序,然后点击重试,或单击继续,以便安装程序继续安装,并替换这些文件时,系统重新启动。

The following applications are using files which the installer must update. You can either close the applications and click "Try Again", or click "Continue" so that the installer continues the installation, and replaces these files when your system restarts.

我想升级安装过程中停止Windows服务。我曾尝试创建一个自定义操作并重写OnBeforeInstall methoc,然而,这被称为太晚了已经发生的警告弹出消息之后。

I would like to stop the Windows service during the upgrade install. I have tried creating a custom action and overriding the OnBeforeInstall methoc, however this gets called too late after the warning pop-up message has already occurred.

有什么办法做到这一点的MSI安装程序的一部分。我宁愿没有之前做到这一点作为一个单独的任务来执行MSI安装程序

Is there any way to accomplish this as part of the msi installer. I would prefer to not have to do this as a separate task prior to executing the msi installer.

更新:结果
根据进一步的研究我发现,MSI数据库不支持此功能,但是内置的Visual Studio安装(安装)项目不提供这样做的手段。 。我们必须要么调整的MSI数据库程序,或者与WiX的或商业的安装程序去

Update:
Based on further research I have found that the MSI database does support this, however the built-in Visual Studio installer (setup) projects do not provide a means to do this. One must either tweak the MSI database, or go with WiX or a commercial installer.

推荐答案

看:的http://stackoverflow.com/questions/327895/upgrade-a-windows-service-without-uninstalling

这篇关于一个人如何停止Windows服务来进行升级安装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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