473,778 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows Service project doesn't install using VS 2005

JM
Hi,

I have created a Solution in VS 2005 with 2 simple projects.

First project is simple Windows Service which writes an entry into
event log when it starts and when it stops. Nothing else. I have added
a projectinstalle r also for that. I have used following settings for it
(developed in VS 2005 only):

1. For Service1.cs file, I have kept the default values. i.e. Name of
Service is Service1 only.
2. For ProjectInstalle r.cs file, I have account = LocalSystem and
StartType = Automatic.

Second project is Setup and Deployment project with the "Primary
output" selected for the above project. It does copies the exe file of
the service under program files, BUT doesn't install the service.

I have tried all things but my setup project doesn't install the
service on my PC and I can't see the service under "Services panel" on
my PC. I am running XP professional.

I was having VS 2003 also running on my PC and I have created a service
under that which is running fine.

Does anybody has any clue why this is happening !!

Thanks in advance
JM

Oct 9 '06 #1
3 3078
go to the folder where the exe file is created( in the debug or release
folder of the project) using Visual Studio .Net 2005 Command Prompt.

Type following in the prompt:
installutil <service_file.e xe>

where <service_file.e xeis the executable of the service.
Hopefully this should install the service. If everything goes fine,
start the service under Services
JM wrote:
Hi,

I have created a Solution in VS 2005 with 2 simple projects.

First project is simple Windows Service which writes an entry into
event log when it starts and when it stops. Nothing else. I have added
a projectinstalle r also for that. I have used following settings for it
(developed in VS 2005 only):

1. For Service1.cs file, I have kept the default values. i.e. Name of
Service is Service1 only.
2. For ProjectInstalle r.cs file, I have account = LocalSystem and
StartType = Automatic.

Second project is Setup and Deployment project with the "Primary
output" selected for the above project. It does copies the exe file of
the service under program files, BUT doesn't install the service.

I have tried all things but my setup project doesn't install the
service on my PC and I can't see the service under "Services panel" on
my PC. I am running XP professional.

I was having VS 2003 also running on my PC and I have created a service
under that which is running fine.

Does anybody has any clue why this is happening !!

Thanks in advance
JM
Oct 9 '06 #2
JM
Thanks a lot for your help. It worked like a charm. My service is
installed and I have started it succesfully.

But I would still like to install it using VS 2005 Setup program. Do I
have to do something else for this.

Regards
JM

rohan_from_mars wrote:
go to the folder where the exe file is created( in the debug or release
folder of the project) using Visual Studio .Net 2005 Command Prompt.

Type following in the prompt:
installutil <service_file.e xe>

where <service_file.e xeis the executable of the service.
Hopefully this should install the service. If everything goes fine,
start the service under Services
JM wrote:
Hi,

I have created a Solution in VS 2005 with 2 simple projects.

First project is simple Windows Service which writes an entry into
event log when it starts and when it stops. Nothing else. I have added
a projectinstalle r also for that. I have used following settings for it
(developed in VS 2005 only):

1. For Service1.cs file, I have kept the default values. i.e. Name of
Service is Service1 only.
2. For ProjectInstalle r.cs file, I have account = LocalSystem and
StartType = Automatic.

Second project is Setup and Deployment project with the "Primary
output" selected for the above project. It does copies the exe file of
the service under program files, BUT doesn't install the service.

I have tried all things but my setup project doesn't install the
service on my PC and I can't see the service under "Services panel" on
my PC. I am running XP professional.

I was having VS 2003 also running on my PC and I have created a service
under that which is running fine.

Does anybody has any clue why this is happening !!

Thanks in advance
JM
Oct 9 '06 #3
As far as Windows Setup file is concerned, U must be making some small
mistake or are forgetting some thing. as the service installed
successfully, there should be no probs with the C# files. Just repeat
all the steps carefully.
I suppose u r doing this from the C# Certification book. You must be
missing something. Check properly.

JM wrote:
Thanks a lot for your help. It worked like a charm. My service is
installed and I have started it succesfully.

But I would still like to install it using VS 2005 Setup program. Do I
have to do something else for this.

Regards
JM

rohan_from_mars wrote:
go to the folder where the exe file is created( in the debug or release
folder of the project) using Visual Studio .Net 2005 Command Prompt.

Type following in the prompt:
installutil <service_file.e xe>

where <service_file.e xeis the executable of the service.
Hopefully this should install the service. If everything goes fine,
start the service under Services
JM wrote:
Hi,
>
I have created a Solution in VS 2005 with 2 simple projects.
>
First project is simple Windows Service which writes an entry into
event log when it starts and when it stops. Nothing else. I have added
a projectinstalle r also for that. I have used following settings for it
(developed in VS 2005 only):
>
1. For Service1.cs file, I have kept the default values. i.e. Name of
Service is Service1 only.
2. For ProjectInstalle r.cs file, I have account = LocalSystem and
StartType = Automatic.
>
Second project is Setup and Deployment project with the "Primary
output" selected for the above project. It does copies the exe file of
the service under program files, BUT doesn't install the service.
>
I have tried all things but my setup project doesn't install the
service on my PC and I can't see the service under "Services panel" on
my PC. I am running XP professional.
>
I was having VS 2003 also running on my PC and I have created a service
under that which is running fine.
>
Does anybody has any clue why this is happening !!
>
Thanks in advance
JM
Oct 10 '06 #4

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

Similar topics

2
2747
by: DBT | last post by:
When I add an Install project to my Windows Service project everything compiles and it works okay. The problem is the Installer only writes the files to disk, but doesn't actually install the service. Thus I must manually use InstallUtil.exe to install the service. I thought the installer handled this. I'm using VS2003.
2
3294
by: raghavendra | last post by:
Hi, How to run automatically windows service by using setup deployment insatllation script using visual studio 2003.? What i did is :-- 1. created a windows service & tested the same. 2. then i used the windowsservice.exe in setup deployment project.
3
57004
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 want to test this service on a Windows Server 2003 box that doesn't have the Visual Studio Command prompt. How do I go about installing the service on the Windows Server 2003 box? Thanks!
7
3195
by: Sunil Varma | last post by:
Hello all, I wrote a Windows Service in VC.NET 2005 I want to debug the solution. I tried as mentioned in the following link. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconintroductiontontserviceapplications.asp But, when I started the service I got a message box saying that the service is being stopped.
0
2129
by: JM | last post by:
I have created simple windows service which just write message to event log when it starts and stops. I am able to install it succesfully using: installutil <service_file.exe>, where <service_file.exeis the executable of the service. (Thanks to Rohan). But I want to install it using VS 2005 Setup project and I am unable to do that. I have created a Solution in VS 2005 with 2 simple projects.
0
2699
by: =?Utf-8?B?U2ltb25EZXY=?= | last post by:
Hi All I would like to install the same Windows Service project on the same server under different names, one for each customer. I have been able to do it but I would like an expert opinion as to whether my solution is robust or whether there is a better way to do it. What I've been trying to do is to create a core project with different extension projects, one for each customer. I wanted to create a different Setup project for each...
2
2026
by: Mika M | last post by:
I'm doing Windows Service programming using C# 2005. My solution contains Windows Service project. Then I added Setup and Deployment project into the same solution. Both service- and Setup and Deployment project are working fine. After running setup, it made files into the C:\Program Files\MyCompany\MyService, but how can I install service into the services and start this service using only Setup and Deployment project? Now I can do this...
5
3308
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? Why do I need to set a property within my code to the service name? Are all these required or am I just doing this for consistency purposes?
1
2542
by: =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= | last post by:
I am reviewing Windows service programming. I'm running VS2005 and programming in VB. I've just found an example in Support: '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 I've been able to program and run this example without problems. However, I wonder if I'm missing the point here. How do you deploy a service like this to a machine...
0
10298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10127
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8957
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7475
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5500
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4033
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2865
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.