Wednesday, October 30, 2013

Adding Service Installers to the Windows Service

We have created the windows service and implemented the Start and Stop methods of the service, but for the service to start working it needs to be installed to the list of Window services in the server, to do that we need to create a Service Installer which can install / uninstall the service.

In this post we shall create an installer for a Windows Service.

    1.    Open the Windows service in Designer mode.
    2 .   Right click on the designer and select the option Add Installer

    3.    A ServiceProcessInstaller and a ServiceInstaller, get created.
    4.    Rename the Installers and set the Properties to install the service Manual / Automatic.

    5.    If we need to service to be installed and run under a specific user/account, then we can set this in the Account property of the service installer.
    6.    Here I will set the service to run under the local system account.

     7.  That’s it we can build the project, once built the service is ready to be installed.

Search Flipkart Products:

No comments: