By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,978 Members | 1,467 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,978 IT Pros & Developers. It's quick & easy.

Windows Service project doesn't install using VS 2005

P: n/a
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 projectinstaller 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 ProjectInstaller.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
Share this Question
Share on Google+
3 Replies


P: n/a
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.exe>

where <service_file.exeis 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 projectinstaller 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 ProjectInstaller.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

P: n/a
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.exe>

where <service_file.exeis 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 projectinstaller 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 ProjectInstaller.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

P: n/a
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.exe>

where <service_file.exeis 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 projectinstaller 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 ProjectInstaller.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 discussion thread is closed

Replies have been disabled for this discussion.