我想使用Win32_IP4RouteTable添加路由表
代码:
ManagementClass wmiclass = new ManagementClass("Win32_IP4RouteTable");
ManagementObject route = wmiclass.CreateInstance();
route["Destination"] = "145.63.20.102";
route["NextHop"] = "172.16.213.2";
route["Mask"] = "255.255.255.255";
route["Metric1"] = 20;
route.Put();//or route.Put(new PutOptions() { Type =
PutType.UpdateOrCreate });
我在Put()方法上遇到异常:
`System.Management.Management:Invalid parameter`
如何使用 Put 方法创建新项目