How to get ServiceInstaller and ServiceProcessInstaller on the Installer class file in Windows Services?

Posted by Webmaster under Others category on | Views : 18926
When you create Windows services, you need to add Installer class file by right clicking the project > New items ... > and selecting the Installer class file. Once you have added that, you need to drag ServiceInstaller and ServiceProcessInstaller components on that to specify the service properties (like ServiceName, Account, Description etc.)

In many scenario, you may not get it available on your toolbox, to get it you can follow below steps.

1. Go to the design view of your Services.cs file and right click.
2. Select Add Installer and ServiceInstaller and ServiceProcessInstaller will be added.

The alternate way is

1. Right click the toolbar and select "Choose Items ...".
2. Go to .NET Framework Components tab.
3. Check the checkbox against ServiceInstaller and ServiceProcessInstaller and click OK.
4. Now drag and drop these two components on your Installer class file in the design view and specify the required properties.

Hope this helps.

Thank you.
Happy Coding !!!

Comments or Responses

Posted by: ankitabis123-20572 on: 2/1/2013 Level:Starter | Status: [Member] | Points: 10
Helpful alot... Thanks

Login to post response