Monday 23 May 2011

How to register a windows service

After creating a windows service application, many of the people will try to run the service directly. But this is absolutely not possible until we register the service.

To register the service, first we need to add a Installer to the service. To do this open the service in the GUI mode,right click on the panel and select Add Installer. This will install the project installer file to the project.

Now open the visual studio command prompt and type the following command

installutil myprojectassembly.exe

This will register the windows service.

To check it, open run and type Services.msc. Now you can find your service in the listed services.

No comments:

Post a Comment