MSI安装并启动服务 [英] MSI to install and start a service

查看:290
本文介绍了MSI安装并启动服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VB.NET 2003 Standard中的安装项目来安装windows

服务应用程序。我希望这个安装程序在

安装后启动服务。我该怎么做?


谢谢,

Russ

I''m using a Setup Project in VB.NET 2003 Standard to install a windows
service application. I would like this installer to start the service after
install. How do I do that?

Thanks,
Russ

推荐答案

在你的安装程序类中实现一个Commit覆盖,并使用

ServiceController来实现。


" Russ Green" < RU ** @ NO-SPAMrussgreen.net>在消息中写道

news:eG ************** @ TK2MSFTNGP09.phx.gbl ...
implement a Commit override in your installer class and use
ServiceController to do that.

"Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
我正在使用VB.NET 2003 Standard中的安装项目,用于安装windows
服务应用程序。我希望这个安装程序在安装后启动服务
。我该怎么做?

谢谢,
Russ
I''m using a Setup Project in VB.NET 2003 Standard to install a windows
service application. I would like this installer to start the service after install. How do I do that?

Thanks,
Russ



请参阅MSDN主题演练:在

组件设计器中创建Windows服务应用程序。也许你已经这样做了,但这指的是安装你的服务的自定义动作

。在Install方法中(覆盖它)使用

ServiceController启动它。


(如果你的公司恰好使用InstallShield,Wise等商业工具

等,你不需要以上任何一个。他们在MSI

文件,ServiceInstall和ServiceControl表中创建了正确的条目,它们获得了Windows Installer

在没有你需要编写代码的情况下完成所有这些工作)。

-

Phil Wilson [MVP Windows安装程序]

----

" Russ Green" < RU ** @ NO-SPAMrussgreen.net>在消息中写道

news:eG ************** @ TK2MSFTNGP09.phx.gbl ...
See the MSDN Topic "Walkthrough: Creating a Windows Service Application in the
Component Designer". Maybe you already did, but that refers to a custom action
that installs your service. In the Install method (override it) use
ServiceController to start it.

(If your company happens to use a commercial tool from InstallShield, Wise etc
etc, you don''t need any of the above. They create the right entries in the MSI
file, ServiceInstall and ServiceControl tables, that get the Windows Installer
to do literally all of that stuff without you needing to write code).
--
Phil Wilson [MVP Windows Installer]
----
"Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
我正在使用VB.NET 2003 Standard中的安装项目,用于安装windows
服务应用程序。我希望这个安装程序在
安装后启动服务。我该怎么做?

谢谢,
Russ
I''m using a Setup Project in VB.NET 2003 Standard to install a windows
service application. I would like this installer to start the service after
install. How do I do that?

Thanks,
Russ



你是对的,提交是比安装方法更好的地方。

-

Phil Wilson [MVP Windows安装程序]

----

" konsu" < KO *** @ hotmail.com>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP12.phx.gbl ...
You''re right, Commit is a better place than the Install method.
--
Phil Wilson [MVP Windows Installer]
----
"konsu" <ko***@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
实施一个在您的安装程序类中提交覆盖并使用
ServiceController来执行此操作。

Russ Green < RU ** @ NO-SPAMrussgreen.net>在消息中写道
新闻:eG ************** @ TK2MSFTNGP09.phx.gbl ...
implement a Commit override in your installer class and use
ServiceController to do that.

"Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
我正在使用安装项目VB.NET 2003 Standard安装windows
服务应用程序。我希望这个安装程序在
I''m using a Setup Project in VB.NET 2003 Standard to install a windows
service application. I would like this installer to start the service
install之后启动服务


after


。我该怎么做?

谢谢,




这篇关于MSI安装并启动服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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