Start services.msc connected to remote machine

G

Guest

I would like to be able to do something like services.msc /target:<machine>.
Is this possible?
 
D

Darhl Thomason

SWDWS said:
I would like to be able to do something like services.msc
/target:<machine>.
Is this possible?

When you have Services open, click "Action", then "Connect to another
computer". I don't know if you can do it with command line switches, but
you can browse for the computer you want to control.

Darhl
 
P

Pegasus \(MVP\)

Darhl Thomason said:
When you have Services open, click "Action", then "Connect to another
computer". I don't know if you can do it with command line switches, but
you can browse for the computer you want to control.

Darhl

sc.exe would be the Command Line equivalent.
 
G

Guest

Of course I already know how to do this within the gui. I want to, from a
list, right click and launch services.msc already remoted to <machine>.
 
Joined
Mar 30, 2016
Messages
1
Reaction score
0
This is very simple: refer below code
services.msc /computer=REMOTEmachinename

Example code:
public
void ServicesMSC()

{
try

{
System.Diagnostics.
ProcessStartInfo objPInfo = new System.Diagnostics.ProcessStartInfo("services.msc");

objPInfo.Arguments =
"/computer=" + this.Hostname;

System.Diagnostics.
Process.Start(objPInfo);

}
catch (Exception ex)

{
Console.WriteLine(ex.ToString());

MessageBox.Show("Error while performing Services.msc. Error Details:" + ex.Message);

}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top