CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2000
    Posts
    21

    Win32_NTLogEvent

    I have a problem when I try to monitor the new event that appear in EventLog. I can catch the new event on a remote computer but when I indicate localhost, I get access denied. the Code I use is verry simple:

    Set EventSource = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecNotificationQuery ("select * from __InstanceCreationEvent where TargetInstance isa 'Win32_NTLogEvent'")

    While true
    Set NTEvent = EventSource.NextEvent
    WScript.Echo NTEvent.TargetInstance.Message
    Wend

    If i set remote computer with //name, everything it's ok. I get the new events on that ocurre on that machine. If I leave the code jst like that, I get an access denied from SWbemService.
    What should I do?



  2. #2
    Join Date
    May 2000
    Posts
    21

    Re: Win32_NTLogEvent

    The same this is happening when I do the same thing in VC++.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured