Windows Service Installation Issue...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have encountered a problem with the installation of a Windows service. I
know I have done this in the past so I am at a loss as to what I might be
doing wrong.

When I create a setup project for a Windows Service project, build and then
run it, the installation completes successfully but the service does not show
up in the service control panel. If I install the service using
installutil.exe the service will install just fine.

Any suggestions for things to look for or try?

Thank you,

Jason Richmeier
 
Hi Jason,

I assume you have correctly added and configured the Installer class in
your Windows Service application(referred to as "WSA" henceforth).
Also, you have added one ServiceInstaller component to the installer
class for each service that you WSA contains.

You have mentioned that it installs fine, when you do it using
InstallUtil.exe. Therefore the problem must be in the configuration of
the Setup project.

1. Have you added the Primary output of the WSA to your Setup File
System Tab ?
2. Have you added a Custom Action to your Setup project ?
3. Have you added the Primary output of the WSA to all the nodes of
your Setup Custom Actions Tab ?
4. Click the Primary Project Output node under the Install action and
check it's properties. It should have the InstallerClass property set
to True.

These are the things that come to mind, about what to check.

Regards,

Cerebrus.
 
Hi Jason,

It appears you forget to add the serviceInstaller component to your Windows
service project. If so, you just need to switch into your service project's
design view and right click it, then in its context menu click the "Add
Installer" to add one. For the detailed information about this, Please
refer to the following MSDN KB articles and Code Project sample for further
information:

How to create a setup project for a Windows Service application in Visual
C# .NET and in Visual C# 2005
http://support.microsoft.com/default.aspx?scid=kb;EN-US;816169

How to create a Setup project for a Windows Service in Visual Basic .NET or
in Visual Basic 2005
http://support.microsoft.com/kb/317421/en-us

Simple Windows Service Sample(VS.NET 2003)
http://www.codeproject.com/dotnet/simplewindowsservice.asp

I hope the above information helps, if you have any questions or concerns,
please do not hesitate to let me know. I am standing by to help you.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Gary,

Please refer my post. As far as I know, unless a ServiceInstaller
component has been added to the Windows
service project, it will not be installable even using InstallUtil.exe.
Since the OP mentions that he is able to install it using InstallUtil,
could this still be a reason for it not to work using the Setup project
?

Please correct me if I am mistaken about this.

Thanks and Regards,

Cerebrus.
 
Hi Cerebrus,

You are right, I obviously missed that. Jason should have added the
installer since he could use the InstallUtil to install the service.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
From: "Cerebrus" <[email protected]>
Newsgroups: microsoft.public.dotnet.general
Subject: Re: Windows Service Installation Issue...
Date: 14 Apr 2006 00:35:51 -0700
Organization: http://groups.google.com
Lines: 15
Message-ID: <[email protected]>
References: <[email protected]>
<ghK#[email protected]>
NNTP-Posting-Host: 59.144.179.173
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1145000158 24815 127.0.0.1 (14 Apr 2006 07:35:58 GMT)
X-Complaints-To: (e-mail address removed)
NNTP-Posting-Date: Fri, 14 Apr 2006 07:35:58 +0000 (UTC)
In-Reply-To: <ghK#[email protected]>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET
CLR 1.0.3705; .NET CLR 1.1.4322; FDM),gzip(gfe),gzip(gfe)
 
It looks like I might have some reading to do (in the future).

I may be confusing this with something else (or perhaps it is because I have
slept many times since then) but it seems like I created a setup project for
a Windows service that I wrote in VS .NET 2003 but I didn't set any custom
actions. However, in VS .NET 2005 it looks like this is what I was missing.

It took me awhile to figure out what you were talking about (mostly because
I don't recall setting up custom actions before) along with hitting a couple
of snags but I finally got it working like it should.

Thank you so much for you assistance.

Jason Richmeier
 
Back
Top