0

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

alex
  • 21
  • 3
  • "Sometimes" is the scariest word when it comes to crashes. – Ryan Ries Feb 07 '14 at 20:35
  • I have found where is the problem. The solution is described here http://social.technet.microsoft.com/Forums/windowsserver/en-US/08dc6a7b-7309-4008-bcc6-ff54cd09edaa/rsop-access-deny-windows-2003?forum=winserverGP – alex Mar 08 '14 at 19:00

0 Answers0