PC Review


Reply
Thread Tools Rate Thread

Controlling Windows Services Remotely

 
 
OpticTygre
Guest
Posts: n/a
 
      9th Mar 2005
Imagine this scenario:

I have 3 servers: A, B, and C. These servers are in remote locations across
the country not easily accessible. On each of these servers, I have a
windows service running, which I programmed myself. I also have a central
server at my location. Is there a way that I can change the code on my
windows services to be able to stop and start them remotely from my central
server (possibly using another program that I create). Can this be done by
re-coding and using .NET remoting? If so, how? Are there any good
tutorials showing this?

Thanks for any advice.

-Jason


 
Reply With Quote
 
 
 
 
Tom Shelton
Guest
Posts: n/a
 
      9th Mar 2005
On 2005-03-09, OpticTygre <(E-Mail Removed)> wrote:
> Imagine this scenario:
>
> I have 3 servers: A, B, and C. These servers are in remote locations across
> the country not easily accessible. On each of these servers, I have a
> windows service running, which I programmed myself. I also have a central
> server at my location. Is there a way that I can change the code on my
> windows services to be able to stop and start them remotely from my central
> server (possibly using another program that I create). Can this be done by
> re-coding and using .NET remoting? If so, how? Are there any good
> tutorials showing this?
>
> Thanks for any advice.
>
> -Jason
>
>


I'm not sure if this helps you or not, but you can remotely control
services (as long as you have permissions to do so) using the
ServiceControler class provided in System.ServiceProcess namespace.

You would just use the constructor that takes the service name and the
machine name, and then you can Start, Stop, Pause, or send custom
commands to that service. Something to look into anyway

--
Tom Shelton [MVP]
 
Reply With Quote
 
OpticTygre
Guest
Posts: n/a
 
      9th Mar 2005
Thanks for the reply, Tom. Is it possible to do that without the machine
name, and by using the IP address of the machine instead? I'll have to do
some testing to find out if this solution will work or not.

-Jason

>
> I'm not sure if this helps you or not, but you can remotely control
> services (as long as you have permissions to do so) using the
> ServiceControler class provided in System.ServiceProcess namespace.
>
> You would just use the constructor that takes the service name and the
> machine name, and then you can Start, Stop, Pause, or send custom
> commands to that service. Something to look into anyway
>
> --
> Tom Shelton [MVP]



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling a computer remotely AP Windows XP General 2 16th Jul 2005 05:32 PM
Accessing Services Remotely in Windows XP Imran Sadat Microsoft Windows 2000 Networking 5 2nd Nov 2004 02:27 AM
Controlling Windows 2000 Pro remotely i-ball Windows XP Help 2 25th Jun 2004 03:35 PM
Re: Can patches and SP's be remotely installed using Windows 2K Terminal Services ? Ray at Microsoft Windows 2000 0 1st Aug 2003 07:59 PM
Windows XP: Automatic Login with passworded user and Remotely Start Services David Windows XP General 0 19th Jul 2003 03:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:05 AM.