Service Control program is a powerful tool that can be used to Install/Uninstall and perform other actions on Windows Services. Sample screenshot shows different parameters and options for sc.exe tool.
I will base my example on creating SVN version control Windows Service.
To install SVN Windows Service run
sc create "Subversion Server" binpath= "path_to_subversion\bin\svnserve.exe --service --root "C:\SVNRoot""
displayname= "Subversion Dev Repository" depend= Tcpip start= auto
To Uninstall SVN Windows Service run
sc delete "Subversion Server"
Make sure that you put space after ‘=’.
Once SVN Windows Service is created allow svnserve.exe in Windows Firewall.
References
How to create a Windows service by using Sc.exe