Hi,
Try this:
ConnectionOptions connection = new ConnectionOptions();
ConnectionOptions options = new ConnectionOptions();
string targetIpAddress = "210.0.0.000";
connection.Authentication = System.Management.AuthenticationLevel.Packet;
ManagementScope scope = new ManagementScope(("\\\\" + targetIpAddress), options);
scope.Connect();
ManagementPath p = new ManagementPath("Win32_Product");
ManagementClass classInstance = new ManagementClass(scope, p, null);
ManagementBaseObject inParams = classInstance.GetMethodParameters("Install");
inParams["AllUsers"] = true;
inParams["Options"] = string.Empty;
inParams["PackageLocation"] = "\\\\" + targetIpAddress + "\\C$\\Sample.msi";
ManagementBaseObject outParams = classInstance.InvokeMethod("Install", inParams, null);
string retVal = outParams["ReturnValue"].ToString();
Hope this could help...
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Regards,
Algem