(Not sure if this is the best forum, but I am using C# and did not see a forum for Windows Services).
I have just created a new Windows Service using C#, Visual Studio 2003, .NET 1.1 on my computer running Windows XP v5.1.
The whole thing compiles without any errors and when I installed it using installutil, all messages indicate that it was installed correctly. However, my new Windows Service does not display on the list of available services in the Control Panel> Administrative Tools>Services tool. I have hit the Refresh button many times and even rebooted my PC and it still does not show.
I then tried creating a setup project for it in Visual Studio. The setup project compiles and runs correctly with no sign of an error, but still nothing in the Services tool. Note that my service DOES show on the Control Panel> Add and Remove Programs listing. And if I try to install it again without un-installing, it gives me a 'Repair or Remove' prompt, so it knows it is there. I have uninstalled/reinstalled, refreshed, and rebooted several times and it still does not show in the Services listing! !
Any ideas as to what could be the problem

Problem Installing New Windows Service
Emil Steen @ Cognitio
zombie
That was the issue. The example that I was following from the web did not include or mention the installer class. I added one in and it now installs correctly and displays on the Services listing. Odd that there was no errors or warnings when I did not have it.
Next Windows Service issue... I want my Windows Service to stop itself under certain circumstances. I have seen a few web sites that recommend using the Environment.Exit command. This does shut down the service alright, but it throws a big ugly error message and adds an error msg to the event log.
Anybody know of a cleaner way to have a Windows Service shut itself down
Thanks!
Heather_Hope
Jeff Young - MSFT
Just a thought
joemorel - MSFT
sarath_lal007
Bruce Johnson [C# MVP]
http://www.objectsharp.com/blogs/bruce