Start, stop, restart a service over a network

jorge

Well-known member
Joined
Jul 13, 2003
Messages
239
Location
Belgium
Hey,
Im working on a GUI for apache(webserver),
Id like to start it from a remote pc, sind i cant 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
 
Didnt read all the link but it seemed to be doing it a very complex way (was it VB6 code?)
This may be easier.
Code:
Dim sc As New System.ServiceProcess.ServiceController
sc.MachineName = "RemoteComputerName"
sc.ServiceName = "ServiceName"	 Apache2 - or whatever
sc.Start()	 Will start it (permissions required)
 
PlausiblyDamp,
Dont seem to work when i try it in my small home network?
Dont know why, computer name of apache (desktop)
Remotecomputer(Dads 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 shouldnt 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 its name (both ways worked here) - may be a WINS / DNS problem.
 

Similar threads

Back
Top