I have used sample code from the W2K resource kit as well as other places,
and I always get the access denied error. Does anyone know why I might be
getting this problem?
Thanks,
Dan
bye
Andrea
"Dan" <dal...@towson.edu> wrote in message
news:O40vdH6MAHA.247@cppssbbsa05...
"Andrea Cuozzo" <andrea...@reti.it> wrote in message
news:OXVwjJ6MAHA.247@cppssbbsa05...
"Dan" <dal...@towson.edu> wrote in message news:eLCVirS...@cppssbbsa02.microsoft.com...
I get the error when I register for the events. (oEnumerator.NextEvent) Here is my code, problem line in Red:sWBEMClass = "Win32_NTLogEvent"
sNamespace = "root\cimv2"
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Set oService = oLocator.ConnectServer(sServer, sNamespace) oService.Security_.ImpersonationLevel = 1
sQuery = "Select * from __InstancecreationEvent where TargetInstance isa ""Win32_NtLogEvent"""
oService.Security_.AuthenticationLevel = 2
Set oEnumerator = oService.ExecNotificationQuery(sQuery)
Do
Set oInstance = oEnumerator.NextEvent 'This is where I get Access Denied.
DumpToDataBase (oInstance.TargetInstance)
Loop"DFENS" <mma...@home.com> wrote in message news:qiwF5.2646$f5.1...@news1.sttls1.wa.home.com...
"Manfred Braun" <mbr...@manfred.mannheim-netz.de> wrote in message news:O2k#SYVNAHA.253@cppssbbsa05...
Bobby Malik
"Dan" <dal...@towson.edu> wrote in message
news:uSmaAL7MAHA.195@cppssbbsa05...
> No, I am not specifying username/password, just using the pass-through
auth.
> I think I've also tried most of the security/impersonation levels. I just
> don't understand why i can access remote machines, but not my own!
>
>
>
>
> "Andrea Cuozzo" <andrea...@reti.it> wrote in message
> news:OXVwjJ6MAHA.247@cppssbbsa05...
> > You'll have probably already done this, but it looks like WMI doesn't
like
> > specifying username and password when connecting to the local computer:
> > you're not using username and password when connecting locally, are you
?
> >
> > bye
> > Andrea
> >
"Dan" <dal...@towson.edu> schrieb im Newsbeitrag news:OLvT1t3...@cppssbbsa02.microsoft.com...