| View previous topic :: View next topic |
| Author |
Message |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Mon Jan 13, 2003 3:44 pm Post subject: Communication with Windows Service Manager |
|
|
I need to write a program that will check the status of a service on a Win2k Server, stop it if it is running and then restart it. Is there any way to do this with VDS? |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Tue Jan 14, 2003 8:49 pm Post subject: |
|
|
| No ideas? Anybody? |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Thu Jan 16, 2003 2:40 pm Post subject: |
|
|
Well, just in case anybody is curious, there are two programs that are included with windows that can be used to start and stop services. Both files should be in the C:\windows\system32 or C:\winnt\system32 folder. BTW, both are console programs.
The first is the net.exe file. Usage is "net start service_name" or "net stop service_name". The other is more of a debugging tool which is nice because it gives more detailed info about the service. It is the sc.exe file. Usage is "sc start service_name", "sc stop service_name" or if you want to find out the status of the service, "sc query service_name".
If anyone was looking into this for me, thanks anyway. |
|
| Back to top |
|
 |
|