I have a website that does all kinds of maint. functions for our systems.
One of the things I'd like to do is be able to restart a service that's on
another computer. Can somebody point me in the right direction to do that?
I think there may be issues of user privileges.
TIA - Jeff.
Kevin Spencer - 23 Jul 2007 13:30 GMT
The application will have to log on to the other computer using an account
with the necessary priveleges.

Signature
HTH,
Kevin Spencer
Microsoft MVP
Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
>I have a website that does all kinds of maint. functions for our systems.
>One of the things I'd like to do is be able to restart a service that's on
[quoted text clipped - 3 lines]
>
> TIA - Jeff.
Fred Mertz - 23 Jul 2007 14:52 GMT
Take a look at the ServiceController class. It is there to enable us to
programmatically access and control Windows services. One overload lets you
specify both the service and machine
(http://msdn2.microsoft.com/en-us/library/ssbk2tf3.aspx)
-HTH
>I have a website that does all kinds of maint. functions for our systems.
>One of the things I'd like to do is be able to restart a service that's on
[quoted text clipped - 3 lines]
>
> TIA - Jeff.
Ignacio Machin ( .NET/ C# MVP ) - 23 Jul 2007 15:05 GMT
Hi,
>I have a website that does all kinds of maint. functions for our systems.
>One of the things I'd like to do is be able to restart a service that's on
>another computer. Can somebody point me in the right direction to do that?
>
> I think there may be issues of user privileges.
You can use ServiceController to control a service. Of course you need your
app to have admin. priv. You can do so by impersonate.