I have tired to uninstall a disabled windows service through registry It is removed from registry but it is still showing in Services.msc with
Descr
I tried almost all of the solutions listed above. What finally worked for me was deleting it from the Task Manager.
I am using Apache's ProcRun application to wrap my Java code in a windows service. While the command line details in the Task Manager helped identify the process running the service. Just deleting that process fixed the issue!
I also deleted my service using windows registry.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services]
In my case i didn't restart my PC, I just restart the task manager and deleted service was no more there.
sc delete "service name which you want to delete"
Intuition/How you got there -
I am assuming you did either or both of these to land in this error message. a.Deleted the key manually from registry by HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and deleted the service from here)
b.This service was in "automatic" start - so on deleting the service was somehow mislead in "starting automatically" - and hence produced this code Failed to read description error code 2 . Here's why - You should have stopped the service, or changed it to "Start manually" before doing this.
How to fix it and what worked for me -
[1]Go to cmd prompt in admin mode (meaning select cmd -> "Run as Administrator")
You should be in "C:/windows/system32/" [This should come up be default if you are in admin mode, as above] Type -> sfc /scannow After this the scan will begin and the following logs will appear --
Beginning system scan. This process will take some time.
Beginning verification phase of system scan. Verification 100% complete. Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For example C:\Windows\Logs\CBS\CBS.log
The system file repair changes will take effect after the next reboot.
[2] Finally reboot your system ! And the service will no longer appear in services.msc.
Follow these instructions to remove the service. Make sure that you use the service's name, not its display name!
The service shouldn't show up in Services.msc after that, but you may still have old items in the Event Viewer that can't display their description properly.
This error indicates that the service description key in registry [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services] is deleted but the service description in memory is not cleared yet. To resolve this, Reboot the PC / Server and try again.