I'm using the following code.
ServiceController MyController = new ServiceController();
MyController.MachineName = server_txt.Text.Trim();
MyController.ServiceName = "Service1";
string msg = MyController.Status.ToString();
Label1.Text = msg;
This code works fine for network computers where I have access. How to change this so it works for the systems in different domains using credentials?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…