forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Communication with Windows Service Manager

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Mon Jan 13, 2003 3:44 pm    Post subject: Communication with Windows Service Manager Reply with quote

Question 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
View user's profile Send private message Send e-mail
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Tue Jan 14, 2003 8:49 pm    Post subject: Reply with quote

No ideas? Anybody?
Back to top
View user's profile Send private message Send e-mail
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Thu Jan 16, 2003 2:40 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group