473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Windows Service Installation Issue...

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
Apr 13 '06 #1
6 1497
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.

Apr 14 '06 #2
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...b;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/si...owsservice.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.

Apr 14 '06 #3
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.

Apr 14 '06 #4
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" <zo*****@sify.com>
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: <11*********************@e56g2000cwe.googlegroups. com>
References: <FA**********************************@microsoft.co m>
<gh**************@TK2MSFTNGXA01.phx.gbl>
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: gr**********@google.com
NNTP-Posting-Date: Fri, 14 Apr 2006 07:35:58 +0000 (UTC)
In-Reply-To: <gh**************@TK2MSFTNGXA01.phx.gbl>
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)Complaints-To: gr**********@google.com
Injection-Info: e56g2000cwe.googlegroups.com; posting-host=59.144.179.173;
posting-account=WgcSqA0AAAB_BYSENoP38KtTZ9roOl2N
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFT FEEDS01.phx.gbl!newsfeed00
..sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!border1.nn tp.dca.
giganews.com!nntp.giganews.com!postnews.google.com !e56g2000cwe.googlegroups.
com!not-for-mailXref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:193184
X-Tomcat-NG: microsoft.public.dotnet.general

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.


Apr 14 '06 #5
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

"Cerebrus" wrote:
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.

Apr 17 '06 #6
You're most welcome, and I'm glad it's working now !

Happy coding,

Regards,

Cerebrus.

Apr 18 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tim Marshall | last post by:
I've just received a new computer with Win XP Version 5.1.2600. I want to have Access 2003 and Access 97 running on this, so I did some googling on cdma and it seems I must install these versions...
2
by: Mark | last post by:
I created an extremely simple windows service that only writes to the EventLogs on Stop and Pause. I installed it using the InstallUtil.exe program, the output of which is below. It appears to be...
3
by: Jeremy S. | last post by:
On my dev machine (XP/Pro with VS.NET 2003) I have been developing a Windows Service and installing it on the local machine by opening the Visual Studio Command Prompt and then executing . Now I...
0
by: Nathan Kovac | last post by:
I am stumped once again. Perhaps Nicholas or someone will be able to help me solve this issue. For background you can see my earlier post about timers and windows servcice. That issue was...
8
by: Mark Rowland | last post by:
Please bear with me, as I am a newbie in the world of databases and DB2. We are trying to migrate an application that binds to a DB2 database (Workgroup Edition, V6.1) from a server running Windows...
1
by: Al | last post by:
Hi - I have a interesting issue that I am trying to resolve with a Windows Service I created. I am trying to allow the end-user to install multiple copies of the service on the same server (think...
1
by: 511 | last post by:
I have written a Windows service which is consuming a webservices. When i am trying ti install the windows service using installutil.exe it gives me an errorr:- Exception occured while...
1
by: jehugaleahsa | last post by:
Hello: I wrote an .exe that I would like to be called by a service I am deploying to a server. However, I am not sure how to tell the setup project to include the .exe. Also, I do not know...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.