如何在C# 中使用WMI 实现远程查询和共享[2]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 smandhgx 的 blog

private void remoteenumerate_click(object sender, system.eventargs e)

{

//如果是对远程机器进行访问,必须要进行连接,本地可以省略

connectionoptions oconn = new connectionoptions();

//用户名和口令是你登陆对方是必须输入的,也就是对方给你分配的权限
oconn.username = "zhangdong";
//访问对方的用户名
oconn.password = "1234"; //访问对方的口令

// servername 是对方机器的名字,也可以是 ip 地址,\\root\\cimv2 照抄就行

本文关键:C#,WMI,.NET
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top