Install & Uninstall C# Windows Service

Run Command Prompt as Administrator, then to install:
C:\> %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe /i C:\CSharpWinServiceApp.exe

and to uninstall:
C:\> %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe /u C:\CSharpWinServiceApp.exe

Tip: above command can be used to install a Windows service programmatically as well in C#.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.