This looks like a rewrite of the NETSVC
command from the Win2K resource kit, but it is missing the "remote host" option, that allows you to control services on other machines. Your code appears to prepared to easily include that option too.
NETSVC.exe (Resource Kit)
Command-line Service Controller. Start, Stop and Query services, but d
+oes not cover creating or deleting them.
Although part of the Windows 2000 resource kit - this command runs fin
+e under NT 4.
NETSVC \\server command servicename
server The workstation or server where the service is runnin
servicename The Name of the service, unlike the SC command this w
accept either the DisplayName or the service name
/list Lists installed services. Omit servicename with this
/query Query the status of a service.
/start Start the specified service.
/stop Stop the specified service.
/pause Pause the specified service.
/continue Restart a paused service.
Arguments can be specified in any order:
NETSVC /query \\Server299 "DHCP Client"
NETSVC "DHCP Client" \\Server299 /query
You're just jealous cause the voices are only talking to me.
No trees were killed in the sending of this message. However, a large number of electrons were terribly inconvenienced.