{ //连接远程计算机,我们要想对其进行操作,必须先连接上
connectionoptions myconnect = new connectionoptions();
myconnect.username = "zhangdong";
myconnect.password = "1234";
managementpath remotenamespace = new managementpath("\\\\servername\\root\\cimv2");
managementscope myscope = new managementscope(remotenamespace,myconnect);
//先连接上要引用的 wmi 类在这里我们引用 win32_share 类
managementpath sharepath = new managementpath("win32_share");
objectgetoptions otheroption = new objectgetoptions(null,new
timespan(0,0,10) ,true);
managementclass _processclass = new managementclass(myscope, sharepath,