我参考了论坛上面网上的一些写法 try
{
ManagementObject classInstance = new ManagementObject("root\\CIMV2 ", "Win32_Share.Name= 'Test Share' ", null);
ManagementBaseObject outParams = classInstance.InvokeMethod("Delete ", null, null);
}
catch (Exception ex)
{
//MessageBox.Show(ex.Message, "error!");
}但是不能使用,不知道哪里错了,请大大们指教!
另外参数中的"root\\CIMV2",这个参数代表什么意思呀,看不懂,也麻烦请大大们指教!
{
ManagementObject classInstance = new ManagementObject("root\\CIMV2 ", "Win32_Share.Name= 'Test Share' ", null);
ManagementBaseObject outParams = classInstance.InvokeMethod("Delete ", null, null);
}
catch (Exception ex)
{
//MessageBox.Show(ex.Message, "error!");
}但是不能使用,不知道哪里错了,请大大们指教!
另外参数中的"root\\CIMV2",这个参数代表什么意思呀,看不懂,也麻烦请大大们指教!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货