I have a requirement in the project such that we have to stop a specific service say "x" in a remote machine (which is on the same LAN), change the registry key remotely and start the service again.
I tried the command sc \server stop service
, but I got the error:
[SC] GetServiceKeyName FAILED 1060:
The specified service does not exist as an installed service.
I am using Windows 2003 SP1. Are there any built in commands or APIs that are available on Windows?
I need the commmand to run on the command prompt.