Jul 8, 2012

How to install or uninstall .net windows service - C#

2 comments

In the previous article, create windows service  we learnt creation of windows service using .net (C#). Now we will continue with how to install and uninstall a .NET windows service.

Install service using InstallUtil.exe
To install or uninstall windows service (which was created using .NET Framework) use utilityInstallUtil.exe. This tool can be found in the following path (use appropriate framework version number).

C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe

To install .NET service run command similar to this (specify full path to your service).

InstallUtil.exe "D:\Examples\MyService\MyService\bin\Debug\myservice.exe"

To uninstall .NET service use the same command with parameter /u

InstallUtil.exe /u "D:\Examples\MyService\MyService\bin\Debug\myservice.exe"

That's all now we are done with installation/un-installation of windows service.

2 comments :

  1. Dear, I like your blog very much, I can get many useful information. Hope that we can communicate with each other. By the way, have you ever used memory card software ? Unfortunately I lost my memory card data. I do not know how to do.

    ReplyDelete