C#实现远程机器管理

时间:2023-03-09 16:50:45
C#实现远程机器管理

原文:C#实现远程机器管理

目前处于待离职状态,原先所有的工作都在进行交接,过程当中不乏有很多先前整理的和动手尝试实现的功能;我的主页中已经列出来一部分内容,有兴趣的可以前往看一看。

接下来的内容主要介绍另外一个工具,用于对远程主机进行远程控制、进程管理、服务管理以及WMI相关信息显示等;其中仍然存在部分问题还没有得到有效的解决,希望曾经参与过或者有关相关经验的前辈能够指导一下。

一、很搓很搓的主界面

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAABlCAIAAACp/RprAAANwUlEQVR4nO2d71MbxxnH7y+pM512qr7ItNMyGl2mU15kpnRoO1WnpWmTtFjVKTFtZ9IxfdE2ibk4MYb0ZMUOTmDq/ICpSUQUwkmRyzhxnJLYoTaOYrCOWNiJEwjGYIQwOEYShL64X7t7d+J0SLqTeL7zvLjbuz3E7Yfvs7u3J6jhHi8EhKOCGu7xZkZbIHZafOD1OiG0Hwyg3LlhO44AJQQZtuMIUEKQYTuOACUEGbbjCFBCkGE7jtuF8vypY7bfRAij4P724wJhVMt2HLcL5XD44EA4PPvuQx1PH3pleOJl/sLnpx62vTEgxKgwlJubm5ubm4VLKgHlwpk///Nw34VrXw6NXLs4k/3w87Xhs1dsbwwIMQqQVyanRCncDpHbgvLFyNn3Lt18+/zMJzfzQ6dTk3O50YvT27yV4211LpfL1dA4rnc05ne5XK7Wbvub3PlReSgVFrdJpHUoHzvwgnA9d3UhN7u8/lLk/PXl9ZEPr51JTKfP7hFiLSd7/9rf9WTf0aOR7v1F3crxtjpXQ53XVdfFa47yjV5XnbcBoDQVtkC5fY+0DmXi9d9f/CKfupEbv5pO395YWdto5wanPs5+cjl/NZVPCGvRxO1nz60+9sHqUnqjqFs53lbnctW3+l0uf5POIX99KziludhxTvncE7/8aCZ7ZT73zrnPVrNfPfOv4QOdkVdOLe/aN/Xt9k/uOTr9s/4bzSeW9rxz68ZNK1DG+EaNWTa1uuq6+CYcyuauBpes+h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wHnRkUOYW2JyUirnGcltHpyEDeEgxn4AP9GRTWbuhmKBVXvkYI3LZDiwPb2Nqc70xK9OHWPLPPexqKuLDYqSA824mcKKA64q7juLK64Ftqk44xRFCKVqRupMN6V8g9xUFwMXJ+BrwgpKXdLwaxMhZTVVKhbvf+EGfiATVr3GhWYgQ/YonUVFx9QXAhAcecAxYUAFHcOUFwIQHHnAMWFABR3DlBcCEBx5wDFhQAUdw5QXAhAcecAxYUAFHcOUFwIQHHnAMWFABR3DlBcCNz+alnsqhLiWzKNReM6LfPRSLsWlzXbTThAcSFwNcWJy6NolbWN7O+8UrXG5giJcKFVZUBxIXD/G9vwmTshxhev5WQJhWTqMsKcLEmyHALFgZpxtxcnb+8TShnLpkeExMpCChQHasflt5u6yfScTeLGKNose0p/UByoA7dHVFSn8bZEnQFkmnSptTX6NlAcqAPXBw21BoW4uQQ+D41sZvAOHBQH6sD9cXHlbSbRZxPL+IQ1ZSIntgSKA7XC4aOfVIgc0qaWiTmZxAI+rAjj4oBN4NNN5wDFhQAUdw5QXAhAcecAxYUAFHcOUFwIQHHnAMWFABR3DlBcCEBx5wDFhSAcDvM2oW0BxYUgDDjJ/wG+RzGkHPIKuwAAAABJRU5ErkJggg==" alt="">

1、配置菜单里面包括远程主机连接配置信息的添加和编辑,界面如下:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdIAAADoCAIAAADUlPIeAAAV20lEQVR4nO2dXW8c13mA5x/oH9RB0aLbi0AFqKtelBe5YMGiMItCLZqkZVEWrdUWKGH2oh+xt06iJE5dJ44ph0RryzEapZJlSzJTVxBqO3BimbUcM6Yiy5Isy7Fl2TIlcd06qSXZ2V4sOTx7vubszpl3ZmeeBy+I2TNnzpmdOe+zZ4e7O8nRxSmCIAhCLJKji1Od5V0EQRB1iuenpqoQ5o6hXYIg6hmlCxftEgTRrChduGiXIIhmRenCRbsEQTQrShcu2iUIollRunDzavfEU/9a+kEkCKKZcc/f/qYnXFuVLty82j26/8sH9u+/9L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qUp6y+lf9aGfWHuytrbm126sXrQnuGY8cWsdc1UU0C7AaDC22H0vBj1v9hbShyrWTaJ0bcWv3Vi9mE9QPQieyp7DMjRoF2A0iKXd9/qNo9lH9Yu1MDpi2rUuBL7MoF2AJjK22L0ciSRJ1L8aWjWzTqzd6OHXbqxetOeiFWrVrLPdWHty+fJltAswGowtdt+NRKqS3nL6V11wFUbHr90oXWgCVcu1atZya0ke0C7AaBBXu9a/5oK2tggEtKtifYLvOl5vPCV5QLsAo8HYYved2CRJoj3slajl1nfcEffBr92IHfWwPkFrHfVh3KeMdgFGg7HF7qU64tdu2XtXCGgXYDRAu7UB7QKMBmOL3bfriF+7Ze9dIaBdgNEA7dYGtAswGpR+xzPupRaRggYJ2gUAEAXtAgCIgnYBAERBuwAAoqBdAABR0C4AgChoFwBAFLQLACAK2gUAEAXtAgCIgnYBAERBuwAAoqBdAABR0C4AgChoFwBAFLQLACAK2gUAEAXtAgCIgnYBAERBuwAAogysXYIgCCJnDKBdgiAIoohAuwRBEKKBdgmCIEQD7RIEQYgG2iUIghANtEsQBCEaG9olCIIgxOL/AdifTJpZz2AbAAAAAElFTkSuQmCC" alt="">

2、功能菜单里面包括对远程主机远程控制、远程管理、服务管理和WMI信息查询;

3、添加完成后,功能菜单会进行相应的变化,如下图:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZMAAACVCAIAAAASUICfAAAVjUlEQVR4nO2d23Mb133H9y+pM512is4w085QwyH0UD3kQR11ymGnw3bKpJUIAqzVdtiO1Yc2jQ05iSKJJQU4lhxxWDuMp1F0QXgDwHI0tR05sqhajhmRImmAlm0ZshPClARSBEkABNWHvZ1zdhdYgHs5WHw/83sA9kZysefD3+/swVmhXC6XSqVCobCzs7O9vb0FgEtsb2/v7OwUCoVSqVQul8vl8t7e3jMA9BAKhUI+n8/lcmtra9lsdhUAl8hms2tra7lcLp/PFwqF3d1dyAsYIRQKhZnhTgSCqygUCtAWqICQz+dnhjtzt48jmi1mOzt5CO0v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rOGklemI37B72enepBsRcygysN3qisDc3kMmIsjnJ5ZkJ7XlHg2GTl5lxCKMBNBpCN+fyQSct1cmJ+rmYG5OMLZfi766a6hpPpe84pyk/gmyYW5MCdq0wJzcYTDPfSKoNj556kHKMrP92Gsxo25MA99cwJzcYTT9xYlVZG1oTQ/qmYCebm2VNbxZC48+6cJgbk4wvFREXKVSD2tjJx8ma4oyd4tnsxlZmOYy2PAXBzh/HgusWee6sOi3pOzNIuT0hPv+DCXyY1hLo8Bc3GECyNRkyF6KBbznppfnnpDjptwaTwX7i02MzAXR2AMvX3AXB4D5uIImMs+YC6PAXNxBMxlHzCXx4C5OALmsg+Yy2PAXBwBc9kHzOUxYC6OgLnsA+byGDAXR8Bc9gFzeQyYiyNOnjzpdgP3LDCXx4C5OOIksBOYy0vAXPyysbGRSqUSicTIyEg0Gj0H9sfIyEgikUilUhsbG+Vy2e2PF+wLmItftra2MpnM7OxsIpGIxWLXwP5IJBKzs7OZTCafz8Ncjc7/A5ibO9bewdrkAAAAAElFTkSuQmCC" alt="">

二、主要功能实现部分

远程主机配置信息

    public class RemoteMachine
{
/// <summary>
/// 桌面名称
/// </summary>
public string DesktopName { get { return this._DesktopName ?? this.Server; } set { this._DesktopName = value; } }
private string _DesktopName = null;
/// <summary>
/// 远程桌面的IP地址或者域名
/// </summary>
public string Server { get; set; }
/// <summary>
/// 用户名
/// </summary>
public string UserName { get; set; }
/// <summary>
/// IP
/// </summary>
public string Domain { get; set; }
/// <summary>
/// 登录密码
/// </summary>
public string Password { get; set; }
/// <summary>
/// 允许查询进程
/// </summary>
public bool ShowProcess { get { return _ShowProcess; } set { _ShowProcess = value; } }
private bool _ShowProcess = true;
/// <summary>
/// 允许远程
/// </summary>
public bool RemoteAble { get { return _RemoteAble; } set { _RemoteAble = value; } }
private bool _RemoteAble = true;
/// <summary>
/// 允许查询服务
/// </summary>
public bool ShowService { get { return _ShowService; } set { _ShowService = value; } }
private bool _ShowService = true;
/// <summary>
/// 共享磁盘驱动器
/// </summary>
public bool RedirectDrives { get { return _RedirectDrives; } set { _RedirectDrives = value; } }
private bool _RedirectDrives = true;
/// <summary>
/// 共享打印机
/// </summary>
public bool RedirectPrinters { get { return _RedirectPrinters; } set { _RedirectPrinters = value; } }
private bool _RedirectPrinters = false;
/// <summary>
/// 共享端口
/// </summary>
public bool RedirectPorts { get { return _RedirectPorts; } set { _RedirectPorts = value; } }
private bool _RedirectPorts = false;
/// <summary>
/// 色彩深度
/// </summary>
public Colors ColorDepth { get { return _ColorDepth; } set { _ColorDepth = value; } }
private Colors _ColorDepth = Colors.Color24; public override string ToString()
{
return string.Format("{0}:{1}", this.DesktopName, this.Server);
} public void Save(IniFile iniFile)
{
Save(this, iniFile);
} public void Delete(IniFile iniFile)
{
string section = string.Format("Remote({0})", this.DesktopName);
iniFile.DeleteSection(section);
} public void Load(IniFile iniFile, string desktopName)
{
string section = string.Format("Remote({0})", desktopName);
this.DesktopName = desktopName;
this.Server = iniFile.ReadString(section, "Server", "");
this.UserName = iniFile.ReadString(section, "UserName", "");
this.Domain = iniFile.ReadString(section, "Domain", "");
this.Password = iniFile.ReadString(section, "Password", "");
this.RemoteAble = iniFile.ReadInt(section, "RemoteAble", ) == ;
this.ShowProcess = iniFile.ReadInt(section, "ShowProcess", ) == ;
this.ShowService = iniFile.ReadInt(section, "ShowService", ) == ;
this.RedirectDrives = iniFile.ReadInt(section, "RedirectDrives", ) == ;
this.RedirectPrinters = iniFile.ReadInt(section, "RedirectPrinters", ) == ;
this.RedirectPorts = iniFile.ReadInt(section, "RedirectPorts", ) == ;
this.ColorDepth = (Colors)iniFile.ReadInt(section, "ColorDepth", );
} public static RemoteMachine Load(string desktopName, IniFile iniFile)
{
string section = string.Format("Remote({0})", desktopName);
RemoteMachine mac = new RemoteMachine();
mac.DesktopName = desktopName;
mac.Server = iniFile.ReadString(section, "Server", "");
mac.UserName = iniFile.ReadString(section, "UserName", "");
mac.Domain = iniFile.ReadString(section, "Domain", "");
mac.Password = iniFile.ReadString(section, "Password", "");
mac.RemoteAble = iniFile.ReadInt(section, "RemoteAble", ) == ;
mac.ShowProcess = iniFile.ReadInt(section, "ShowProcess", ) == ;
mac.ShowService = iniFile.ReadInt(section, "ShowService", ) == ;
mac.RedirectDrives = iniFile.ReadInt(section, "RedirectDrives", ) == ;
mac.RedirectPrinters = iniFile.ReadInt(section, "RedirectPrinters", ) == ;
mac.RedirectPorts = iniFile.ReadInt(section, "RedirectPorts", ) == ;
mac.ColorDepth = (Colors)iniFile.ReadInt(section, "ColorDepth", );
return mac;
} public static void Save(RemoteMachine machine, IniFile iniFile)
{
string section = string.Format("Remote({0})", machine.DesktopName);
iniFile.WriteString(section, "DesktopName", machine.DesktopName);
iniFile.WriteString(section, "Server", machine.Server);
iniFile.WriteString(section, "UserName", machine.UserName);
iniFile.WriteString(section, "Domain", machine.Domain);
iniFile.WriteString(section, "Password", machine.Password);
iniFile.WriteInt(section, "RemoteAble", machine.RemoteAble ? : );
iniFile.WriteInt(section, "ShowProcess", machine.ShowProcess ? : );
iniFile.WriteInt(section, "ShowService", machine.ShowService ? : );
iniFile.WriteInt(section, "RedirectDrives", machine.RedirectDrives ? : );
iniFile.WriteInt(section, "RedirectPrinters", machine.RedirectPrinters ? : );
iniFile.WriteInt(section, "RedirectPorts", machine.RedirectPorts ? : );
iniFile.WriteInt(section, "ColorDepth", (int)machine.ColorDepth);
} public static List<RemoteMachine> Load(IniFile iniFile)
{
string[] infos = iniFile.ReadAllSectionNames();
if (infos != null)
{
List<RemoteMachine> macs = new List<RemoteMachine>();
foreach (string info in infos)
{
string section = info.Substring(, info.Length - );
RemoteMachine mac = RemoteMachine.Load(section, iniFile);
macs.Add(mac);
}
return macs;
}
return null;
}
} public enum Colors : int
{
Color8 = ,
Color16 = ,
Color24 = ,
Color32 =
}

1、远程控制功能

工具内实现的远程控制功能需要引用AxInterop.MSTSCLib.dll和Interop.MSTSCLib.dll文件,具体代码如下:

    public partial class DesktopForm : Form, IRemote
{
private AxMsRdpClient4 rdpc = null;
public RemoteMachine Machine { get; set; }
public DesktopForm(RemoteMachine machine)
{
InitializeComponent();
Text = string.Format("【远程】{0}", machine.DesktopName);
this.Machine = machine;
} private void DesktopForm_Load(object sender, EventArgs e)
{
this.rdpc = new AxMsRdpClient4() { Dock = DockStyle.Fill };
this.rdpc.OnDisconnected += rdpc_OnDisconnected;
this.Controls.Add(this.rdpc);
this.SetRdpClientProperties(this.Machine);
Connect();
} private void rdpc_OnDisconnected(object sender, IMsTscAxEvents_OnDisconnectedEvent e)
{ } public bool Connect()
{
try
{
rdpc.Connect();
return true;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return false;
}
} public void Disconnect()
{
try
{
if (rdpc.Connected == )
rdpc.Disconnect();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
} private void SetRdpClientProperties(RemoteMachine machine)
{
rdpc.Server = machine.Server;
rdpc.UserName = machine.UserName;
rdpc.Domain = machine.Domain;
if (!string.IsNullOrEmpty(machine.Password))
rdpc.AdvancedSettings5.ClearTextPassword = machine.Password;
rdpc.AdvancedSettings5.RedirectDrives = machine.RedirectDrives;
rdpc.AdvancedSettings5.RedirectPrinters = machine.RedirectPrinters;
rdpc.AdvancedSettings5.RedirectPorts = machine.RedirectPorts;
rdpc.ColorDepth = (int)machine.ColorDepth;
rdpc.Dock = DockStyle.Fill;
}
}

通过使用RemoteMachine参数实例化并进行远程控制;

                    RemoteMachine mac = item.Tag as RemoteMachine;
using (DesktopForm df = new DesktopForm(mac))
{
df.ShowDialog();
}

2、进程、服务管理等(WMI方式,需要引人System.Management.dll类库,以进程管理为例,ProcessInfo类包含的属性信息可查询MSDN,其他类似)

    public partial class ProcessForm : Form, IRemote
{
private ManagementScope scope = null;
private ManagementClass managementClass = null;
private string path = null;
public RemoteMachine Machine { get; set; }
public ProcessForm(RemoteMachine machine)
{
InitializeComponent();
Text = string.Format("【进程】{0}", machine.DesktopName);
this.Machine = machine;
this.path = "\\\\" + this.Machine.Server + "\\root\\cimv2:Win32_Process";
this.managementClass = new ManagementClass(this.path);
ConnectionOptions options = null;
if (this.Machine.Server != "." && this.Machine.UserName != null && this.Machine.UserName.Length > )
{
options = new ConnectionOptions();
options.Username = this.Machine.UserName;
options.Password = this.Machine.Password;
//options.EnablePrivileges = true;
//options.Impersonation = ImpersonationLevel.Impersonate;
//options.Authority = "ntlmdomain:domain";
}
this.scope = new ManagementScope("\\\\" + this.Machine.Server + "\\root\\cimv2", options);
this.managementClass.Scope = this.scope;
} private DataGridView dataGrid;
private ContextMenuStrip contextMenu;
private ProcessInfo[] processes;
private void ProcessForm_Load(object sender, EventArgs e)
{
this.contextMenu = new ContextMenuStrip();
ToolStripItem item = this.contextMenu.Items.Add("停止");
item.Click += item_Click;
this.dataGrid = new DataGridView() { Dock = DockStyle.Fill, ContextMenuStrip = this.contextMenu, SelectionMode = DataGridViewSelectionMode.FullRowSelect, AllowUserToAddRows = false, AllowUserToDeleteRows = false, ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize, ReadOnly = true, RowHeadersWidth = };
this.Controls.Add(this.dataGrid);
ReLoad();
} private void ReLoad()
{
this.dataGrid.DataSource = null;
this.processes = null;
if (Connect())
{
processes = GetProcess();
DataTable table = ProcessInfo.ConvertTo(processes);
BindData(table);
}
} private void item_Click(object sender, EventArgs e)
{
if (this.dataGrid.SelectedRows.Count == )
{
try
{
UInt32 processId = Convert.ToUInt32(this.dataGrid.SelectedRows[].Cells[].Value);
string processName = this.dataGrid.SelectedRows[].Cells[].Value.ToString();
if (processName != null && MessageBox.Show(string.Format("是否停止\"{0}\"进程?", processName), "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
ProcessInfo process = Array.Find(processes, (pro) => { return pro.Name == processName && pro.ProcessId == processId; });
KillProcess(process);
ReLoad();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
}
}
} public bool Connect()
{
try
{
scope.Connect();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
return scope.IsConnected;
} public void Disconnect()
{ } public void BindData(DataTable table)
{
this.dataGrid.DataSource = table;
} public ProcessInfo[] GetProcess()
{
ManagementObjectCollection queryCollection = this.managementClass.GetInstances();
List<ProcessInfo> processes = new List<ProcessInfo>();
foreach (ManagementObject m in queryCollection)
{
ProcessInfo process = new ProcessInfo(m);
processes.Add(process);
}
return processes.ToArray();
} public void KillProcess(ProcessInfo process)
{
ObjectQuery query = new ObjectQuery(string.Format("select * from Win32_Process where ProcessId={0}", process.ProcessId));
ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);
ManagementObjectCollection queryCollection = searcher.Get();
foreach (ManagementObject m in queryCollection)
{
string[] args = new string[] { "" };
object obj = m.InvokeMethod("Terminate", args);
Console.WriteLine(obj.ToString());
return;
}
}
}

可以通过KillProcess来终止进程;

三、所遇到的问题

(未完待续...)

此处附上源码