How to install a service with sc.exe
Installing a Windows service using sc.exe in windows command prompt doesn't need to be complicated.
To create service:
To create service:
Open windows command prompt as run as administrator
Type:
sc.exe create SERVICE_NAME binpath= "x:\SERVICE\FULL\PATH.exe"
Notice the blank space after binpath= and before ".
Example:
sc.exe create NewService binPath= "x:\service\location\newServiceExample.exe"
To delete service:
To delete service:
Open windows command prompt as run as administrator
Type:
sc.exe delete SERVICE_NAME
Example:
sc.exe delete NewService