How to install and uninstall windows services?

Poster
Posted by Poster under Others category on | Views : 6710
To install windows services, open Visual Studio command prompt and write following code

installUtil.exe "Windows Service Path"


To uninstall windows service, write following code.
installUtil.exe -u  "Windows Service Path"


You can find installUtil.exe file in Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ folder.

Thanks

Comments or Responses

Posted by: Raja on: 7/18/2009 Level:Starter | Status: [Member]
Thanks,

This was exactly I was looking fore. Thank you very much for sharing this.

Regards,
Posted by: Poster on: 7/18/2009 Level:Starter | Status: [Member]
Thanks Raja.

My pleasure to help you.

Regards
Posted by: Poster on: 7/18/2009 Level:Starter | Status: [Member]
Please note that if you do not have the path already referred to Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ folder, you might get error in the command prompt. So make sure that you are into above directory and run the command.

The last folder, version number may vary based on your the .NET version installed on your system.

Thanks
Posted by: Gaur1982 on: 7/25/2013 Level:Starter | Status: [Member] | Points: 10
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.
Call to SDK Command prompt, follow this
Start -> All Programs -> Microsoft .NET Framework SDK v{VERSION} -> SDK Command prompt
Note:-This is very much similar to windows command prompt, but windows command prompt cannot understand these instructions.
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
Type in the SDK command prompt
installutil C:\WindowsService1\bin\Debug\WindowsService1.exe
this is your service's .exe path.
Second Way:

Call to Visual Studio Command Prompt, follow this
Start -> All Programs -> Microsoft Visual Studio {YEAR} -> Visual Studio Tools --> Visual Studio Command Prompt
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.

Much more reference : http://www.planetofcoders.com/how-to-install-windows-service/

Login to post response