Start, stop, restart a service over a network

jorge

Junior Contributor
Joined
Jul 13, 2003
Messages
239
Location
Belgium
Hey,
I'm working on a GUI for apache(webserver),
I'd like to start it from a remote pc, sind i can't do it with apache.exe -k start -n"apache2",
I was thingking about a service controller, will that alow me to start or stop a service on a other computer?

thanx in advance
 
Didn't read all the link but it seemed to be doing it a very complex way (was it VB6 code?)
This may be easier.
Visual Basic:
Dim sc As New System.ServiceProcess.ServiceController
sc.MachineName = "RemoteComputerName"
sc.ServiceName = "ServiceName"	 'Apache2 - or whatever
sc.Start()	 'Will start it (permissions required)
 
PlausiblyDamp,
Don't seem to work when i try it in my small home network?
Don't know why, computer name of apache (desktop)
Remotecomputer(Dad's pc),
Set MachineName "desktop", but nothing hapens :s
 
will have a look tomorrow - no network here.
Does the account you logon to your computer with also exist on the remote computer?
If so are the passwords different? finally is the account and administrative account?
 
Not sure why it shouldn't work - just tried it here in the office ond it worked a charm.

It may be worth trying the remote computers IP address instead of it's name (both ways worked here) - may be a WINS / DNS problem.
 
Back
Top