RSOP Collection Com/WMI errer
-
using
GPMGMTLib;GPM myGPM = null
;
GPMConstants gpmc = null
;
GPMRSOP myRSOP = null
;
myGPM = new
GPMClass();
gpmc = (GPMConstants)myGPM.GetConstants();
myRSOP = myGPM.GetRSOP(gpmc.RSOPModeLogging, ""
, 0);
myRSOP.LoggingComputer = computername;
myRSOP.LoggingFlags = gpmc.RsopLoggingNoUser;
myRSOP.CreateQueryResults();
myRSOP.GenerateReportToFile(GPMReportType.repXML, outputfilename);the above code gives the following error System.Runtime.InteropServices.COMException was unhandled by user code Message="Exception from HRESULT: 0x80041003" Source="Interop.GPMGMTLib" ErrorCode=-2147217405 this is my first time programing with COM objects and not really sure how to fix this error, I see that could be a permission issue, I gave myself Domain admin rights and I still can not run the code on the local machine.
-
using
GPMGMTLib;GPM myGPM = null
;
GPMConstants gpmc = null
;
GPMRSOP myRSOP = null
;
myGPM = new
GPMClass();
gpmc = (GPMConstants)myGPM.GetConstants();
myRSOP = myGPM.GetRSOP(gpmc.RSOPModeLogging, ""
, 0);
myRSOP.LoggingComputer = computername;
myRSOP.LoggingFlags = gpmc.RsopLoggingNoUser;
myRSOP.CreateQueryResults();
myRSOP.GenerateReportToFile(GPMReportType.repXML, outputfilename);the above code gives the following error System.Runtime.InteropServices.COMException was unhandled by user code Message="Exception from HRESULT: 0x80041003" Source="Interop.GPMGMTLib" ErrorCode=-2147217405 this is my first time programing with COM objects and not really sure how to fix this error, I see that could be a permission issue, I gave myself Domain admin rights and I still can not run the code on the local machine.