This post is going to be a really small and simple. In this I will just write down the use of SC utility to delete and create windows services. There are lot of resources on web but I am just posting it to have it for my reference :) as I perform these actions quiet often.
How to create .NET windows service :-
On local computer
Go to Run -> Cmd
use SC - sc create <service name> binpath= "<exe folder>\<exe name>"
e.g. sc create MySampleService binpath= "D:\MySampleServiceProject\MySampleService.exe"
point to note: There should not be a space between binPath and '='. Service name should be in double quotes ("). There must be a space between '=' and the services exe path.
On Remote Computer
How to create .NET windows service :-
On local computer
Go to Run -> Cmd
use SC - sc create <service name> binpath= "<exe folder>\<exe name>"
e.g. sc create MySampleService binpath= "D:\MySampleServiceProject\MySampleService.exe"
point to note: There should not be a space between binPath and '='. Service name should be in double quotes ("). There must be a space between '=' and the services exe path.
On Remote Computer
Go to Run -> Cmd
use SC - sc <remoteservername> create <service name> binpath= "<exe folder>\<exe name>"
How to delete.NET windows service :-
sc delete <servicename>
e.g. sc delete "MySampleService"
Comments
Post a Comment