How to Create / Delete a Windows Service (using sc command)

So, you can actually create a Windows service manually using the SC command. Only few commands required here. Once you have created the command, you will see the name from the Windows services list.

Windows Services - ITsiti

Create Windows Service

Open your command prompt and hit below command. You received a message saying “SUCCESS” once the service has successfully been created.

sc.exe create <SERVICE_NAME> binPath= <PATH_TO_EXECUTABLE> 
DisplayName= <DISPLAY_SERVICE_NAME>

Example,

sc.exe create ITsiti binPath= "C:\Program Files\ITsiti\start.exe" DisplayName= "ITsiti"
[SC] CreateService SUCCESS

Delete Windows Service

It’s easier!

sc.exe delete <SERVICE_NAME>

Example,

C:\>sc.exe delete ITsiti
[SC] DeleteService SUCCESS

Delete Windows Service via REGEDIT

Alternatively, you can delete the service by using regedit / regedit32. Navigate to the following,

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.

At the right pane, locate the service name and right click on it to delete.

You May Also Like

Leave a Reply?