问题描述
一位同事编写了Windows应用程序,让我去做安装程序.我已经通过Visual Studio创建了安装程序项目,并将服务项目的主要输出添加到了新项目中.
A colleague has written a Windows Application and left me to do the installers. I have created the installer project through Visual Studio and added the primary output of the service project to the new project.
当我运行安装程序时,它会创建正确的文件夹并在其中复制dll,exe和配置文件,但实际上并没有进行该服务的安装.
When I run the installer it creates the correct folders and copies the dlls, exe and config file in, but it doesn't do the actual install of the service.
服务"窗口中未列出该服务,如果我双击该exe,则会提示我需要运行installutil来安装该服务.
The service isn't listed in the Services window, and if I double click on the exe I'm told I need to run installutil to install the service.
我如何使安装程序为我执行此操作?我找到了这篇文章:
How do I make the installer do this bit for me? I found this article:
http://www.codeproject.com/KB/install/InstallService.aspx
但是对于我认为很基本的东西来说,这似乎太复杂了.
but that seems overly complex for what I would expect to be pretty basic.
推荐答案
我使用了这篇文章:
如何在Visual Basic .NET或Visual Basic 2005中为Windows服务创建安装项目
感觉很愚蠢,直到完成本文中的所有步骤,我才能弄清楚.无论如何,这都不是琐碎的练习.
Felt pretty dumb that I couldn't figure it all out until I went through all of the steps in this article. It's not a trivial exercise by any means.
这篇关于从Visual Studio安装程序项目安装Windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!