Setup and deployment of a Windows service

M

Mark Rae

Hi,

I have created a Windows service and have followed Microsoft' instructions
here: http://support.microsoft.com/kb/816169 in order to create a setup
project for it so it can be installed on a server.

When I click on the setup.exe file, it appears to go through the
installation wizard correctly, and generates no warnings or errors. At the
end of the process, it tells me that the service has been successfully
installed, and there is an entry in the event log saying the same thing.

However, the service does not show in Service Manager.

I have a recollection that it used to be necessary to use installutil.exe to
do all the service registration stuff etc - is this still required in VS.NET
2005?

Any assistance gratefully received.

Mark
 
M

Morten Wennevik

Hi Mark,

You shouldn't have to use installutil. I have created a windows service
setup and it installs the service just fine.
What do you get if you try to start the service. On the command line run
"sc start servicename".

I suspect the setup is not properly configurated as windows service setups
can be tricky to create.
 
M

Mark Rae

You shouldn't have to use installutil.

That's what I thought. However, when I do run installutil.exe manually,
everything works perfectly...
What do you get if you try to start the service. On the command line run
"sc start servicename".

Well, obviously it starts because I've now run installutil.exe manually...
I suspect the setup is not properly configured as windows service setups
can be tricky to create.

Well, (I'm pretty sure) I followed the instructions exactly as described in
http://support.microsoft.com/kb/816169 - can you suggest any particular
configuration setting I should be checking...?
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Mark Rae said:
Hi,

I have created a Windows service and have followed Microsoft' instructions
here: http://support.microsoft.com/kb/816169 in order to create a setup
project for it so it can be installed on a server.

When I click on the setup.exe file, it appears to go through the
installation wizard correctly, and generates no warnings or errors. At the
end of the process, it tells me that the service has been successfully
installed, and there is an entry in the event log saying the same thing.

However, the service does not show in Service Manager.

Out of curiosity, did u hit refresh?

Install a service is extremely simple, in the service''s design view select
Add Installer, this will add two instances.
Then add a Setup project to the same solution. finally add a custom action
to the output and it will create all what is needed.
 
M

Mark Rae

Out of curiosity, did u hit refresh?

:) Yes of course - even did a reboot...
Install a service is extremely simple, in the service''s design view
select Add Installer, this will add two instances.
Then add a Setup project to the same solution. finally add a custom action
to the output and it will create all what is needed.

I trashed the Setup project and recreated it - now it works - guess I had a
bit of a senior moment... :)

Apologies for the waste of bandwidth...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top