How to Install Windows Service?

This post explain you simple and quick way to install a Windows Service in your machine. Before this you must write a Windows Service in your preferred language like (C#,VB.NET etc…). There are basically 2 ways to install Windows Service. Then follow these quick steps.
First Way:
You have to get the support of .NET SDK Command prompt for install the service into your local machine.

  1. Call to SDK Command prompt, follow this
    Start -> All Programs -> Microsoft .NET Framework SDK v{VERSION} -> SDK Command prompt
    Note:-

    1. This is very much similar to windows command prompt, but windows command prompt cannot understand these instructions.
    2. If in your machine you didn’t find “SDK Command Prompt” in your machine then please download it and install it by using this URL : Microsoft Windows SDK for Windows 7 and .NET Framework 4
  2. Type in the SDK command prompt
    installutil C:\WindowsService1\bin\Debug\WindowsService1.exe
    this is your service’s .exe path.

Second Way:

  1. Call to Visual Studio Command Prompt, follow this
    Start -> All Programs -> Microsoft Visual Studio {YEAR} -> Visual Studio Tools –> Visual Studio Command Prompt
  2. Type in the Visual Studio Command Prompt
    installutil C:\WindowsService1\bin\Debug\WindowsService1.exe
    this is your service’s .exe path.

Now your Windows service has successfully installed with Windows Environment. To start that, go to
Start -> Run type services.msc and run it.
In this services window, find your Windows Service and Write Click on it and select Properties. Set Startup type as Automatic or Manual.
Now restart your machine and find your Windows Service by Task Manager. It will display in task manager under running services.

Tagged . Bookmark the permalink.

Leave a Reply