Hi,

Following is the code which I have used for installing a hot fix through WMI commandline parameter. I have switched over to this ProcessClass option, after being unable to do this through WMIProductClass option. In the following scenario, I did an installation of an MSPwhich was not compatible with the already installedMSI. Outparams[ReturnValue] always returned me 0 (since this value, I believe is the return value of the process and not the result of the commandline). I need the error code which says that there is a mismatch in the version. Could someone help me ASAP?

ObjectGetOptions

objectGetOptions = new ObjectGetOptions();
ManagementPath managementPath = new ManagementPath("Win32_Process");
ManagementClass processClass = new ManagementClass(mMgmtScope, managementPath, objectGetOptions);ManagementBaseObject inParams = processClass.GetMethodParameters("Create");inParams["CommandLine"] = @"msiexec /p " + "\"" + _MSIPATH + "\" " + parameters[1].ToString() + " /qn" ;
ManagementBaseObject outParams = processClass.InvokeMethod("Create", inParams, null);
intRetVal =
Convert.ToInt32(outParams.Properties["ReturnValue"]);