I need to retrieve data from RSOP using the following script written in VBS:
Const FL_FORCE_CREATE_NAMESPACE = 5
strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,AuthenticationLevel=default}!\\" & strComputer & "\root\rsop")
Set provider = objWMIService.Get("RsopLoggingModeProvider")
provider.RsopCreateSession FL_FORCE_CREATE_NAMESPACE, Null, namespaceLocation, hResult, eInfo
Wscript.Echo "hresult " & hresult
sometimes it crashes with the following error: hresult -2147217405
The HRESULT code is 80041003 error in HEX form.
Script is called by a service. Platform: Windows 2003
I believe that it is a problem with permissions for WMI RSOP namespace, but I do not know what permissions should be. Anybody knows where is the problem?
Thank you in advance