=== Find and delete the service ===
A rugue DHCP is running on my PC as a service. Let's find the service name, stop and delete it
First let's find the service with name containing "dhcp"...
wmic service where "name like 'dhcp%'" list status
CMD replies:
C:\Work_Dir\VoIP\DHCP server>wmic service where "name like 'dhcp%'" list status
ExitCode Name Status
0 Dhcp OK
0 DHCPServer OK
So there is a service called "DHCPServer running on the computer
Let's stop it...
sc stop DHCPServer
CMD replies:
SERVICE_NAME: DHCPServer
TYPE : 10 WIN32_OWN_PROCESS
STATE : 3 STOP_PENDING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x4
WAIT_HINT : 0x0
Now we can delete the service
sc delete DHCPServer
and the CMD replies:
[SC] DeleteService SUCCESS