How to uninstall a service
You are not able to uninstall a service from the software menu. Uninstalling the whole software from Add/remove programs and restarting a system also fails.
There are three methods available to manually uninstall a service. Please be aware that uninstalling any CodeTwo service following steps below may get you to a point where the whole CodeTwo software will not work and the full reinstallation will be required. Go for manual service removal option only if you know what you are doing.
Solution 1 - sc.exe:
There is a special tool for services manipulation delivered with Windows (sc.exe). Using it is the recommended way of manually deleting a Windows service.
- Start Windows command line (cmd.exe).
- Type in and execute the following command. On the list of services find the short name of the service in question by the SERVICE_NAME label:
- Type in and execute the below command swapping <SERVICE_NAME> for the service name. This will stop the service if it is still running.
sc stop <SERVICE_NAME>
- Type in and execute the below command swapping <SERVICE_NAME> for the service name. This will uninstall the service.
sc delete <SERVICE_NAME>
If for some reason the sc command does not work please navigate to the below path (where sc.exe file is located) and try again:
To find out more on sc.exe please refer to this MS article.
Solution 2 - InstallUtil.exe:
If you trying to uninstall a .NET created service, aside from sc.exe you can also use a .NET tool - InstallUtil.exe. This method will be useful for developers and "power users".
- If you are a developer using MS Visual Studio go to Visual Studio, Visual Studio Tools, Developer Command Prompt. Alternatively Start Windows command line (cmd.exe) and navigate to appropriate .NET framework folder where InstallUtil.exe tool is located. The default path is as presented below where <64> is optional and <framework_ver> is the exact .NET version number. You need to use the tool for appropriate architecture and matching .NET version.
- Type in and execute the following command. You need to know the service exe file and fit it in <service_executable> below:
installutil /u <service_executable>.exe
If you need more details on this method please refer to MSDN.
Solution 3 - registry modification:
The manual Windows registry modification method is recommended only for experienced users. Improperly edited Windows registry may get permanently corrupted.
- Start Windows registry editor (regedit.exe) and navigate to the below path:
- Delete registry subkey related to the service in question.
- Restart Windows.
|Related products:||General (Microsoft 365, Exchange & more)|