起动是可以的,但是为什么没有界面呢,请高人指点!
关键代码如下:
System.Management.ManagementScope ms = new System.Management.ManagementScope("\\\\" + stringMachineName + "\\root\\cimv2", co);      
//设置对象路径
ManagementPath path = new ManagementPath( "Win32_Process");
ManagementPath parapath=new ManagementPath("Win32_ProcessStartup");
ManagementClass xx=new ManagementClass(ms,parapath,null);
  //  xx.SetPropertyValue("ShowWindow",5);
xx["CreateFlags"]=16777216;
xx["ShowWindow"]=1;

//得到线程管理类的实例
ManagementClass processClass = new ManagementClass(ms,path,null);
// ManagementBaseObject inpara=processClass.GetMethodParameters("Create");
// inpara["CommandLine"]=@"E:\abbeywmi\project\WMI\WMIApplication\bin\Debug\wmi.exe";
// inpara["CurrentDirectory"]=@"";
// inpara["ProcessStartupInformation"]=xx;
// inpara["ProcessID"]=0;
object[] methodArgs = {@"E:\abbeywmi\project\WMI\WMIApplication\bin\Debug\wmi.exe",@"E:\abbeywmi\project\WMI\WMIApplication\bin\Debug\", xx, 0};
//反射调用方法,启动线程

processClass.InvokeMethod(observer, "Create",methodArgs);
请指教,在线等