Uninstalling a Windows Service
Before uninstalling a Windows Service first ensure that it is not running. Locate the service in the Windows Services panel. To open the services panel:
Locate Services in Control Panel Locate Services in the Start menu Hold the Windows button, press R and type services.msc. Type Services in Windows Search. If your service is listed as running, right-click on it and select Stop. Once the service has successfully stopped it can be uninstalled.
Windows Services are uninstalled through the command line utility in Windows, using the application installutil.
Open a command prompt as an administrator. Type the following into the command prompt:
C: cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 Installutil.exe /u [PATH TO YOUR SERVICE]
Line 1 changes the drive to your c drive. Line 2 changes the directory to your installed version of .net. Line 3 uses installutil to uninstall your service.
Once run a feedback message will display the success or failure of the uninstallation. You can check the uninstallation was successful through the WIndows Services panel (it should no longer be listed)
To help automate the uninstallation of services, I like to create a batch file to uninstall the service for me. Open a text editor and enter the following text
@echo on c: cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 set SERVICENAME=SupplierInvoicingAutomation.WS.Process.exe set CURDIR=%~dp0 set FULLPATH="%CURDIR%%SERVICENAME%" Installutil.exe /u %FULLPATH% pause
Replace [SERVICE NAME] with your service name. Save the text file as _install.bat. Now to install your service simply right-click on the batch file and select Run as Administrator.