Re: WMI & Events on Computers
From: Dirk (dirk_at_nospam_to_remove_ofcourse.woodstone.nu)
Date: 02/19/04
- Next message: Steve Predmore: "Re: WMICORE.exe hangs"
- Previous message: Leo: "Re: WMI & Events on Computers"
- In reply to: Leo: "Re: WMI & Events on Computers"
- Next in thread: Leo: "Re: WMI & Events on Computers"
- Reply: Leo: "Re: WMI & Events on Computers"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Feb 2004 10:32:27 +0100
If what you want to do is exactly on www.eventlog.com why don't you (your
company) buy some licenses of it?
dirk.
"Leo" <kbumbaz@yahoo.fr> wrote in message
news:40345827$0$22396$626a14ce@news.free.fr...
> MMMM ok tanks a lot !
>
> I don't know if you understand what I would like to do !
>
> ok I explain :)
>
> I am network administrator, I have, sometime, to go to the computer to see
> the evenements !
> My topic is to make a little apps to see the events of a cumputer B when I
> am on my Administrator Computer (Computer A) , in order to analyse what
> happened on the computer B !
>
> I think the code you show me juste return an event to the Computer A when
> the event arrive on the Computer B ? isn't it ?
>
> see http://www.eventlog.com/ it is exatly what I would like to do !
>
> A list of computer ... (My Apps Alread make a list of computer in my
active
> directory)
> for each computer, I can see the event log for Apps, Security & System
>
> .... do you understant .. excuse my poor english I am french :):):)
>
> Good Day :)
>
> "Jiachuan Wang [MSFT]" <jiawang@online.microsoft.com> a écrit dans le
> message de news:%23hl3YUn9DHA.2416@TK2MSFTNGP10.phx.gbl...
> > besides the sample code I posted, you can read more about WMI .NET from
> > MSDN. There's a section "Managing Applications Using WMI" under that it
> > discusses remoting and consuming events using managed code
> >
> >
>
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconmanagingapplicationsusingwmi.asp
> >
> >
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> > "Jiachuan Wang [MSFT]" <jiawang@online.microsoft.com> wrote in message
> > news:Ogi5YIn9DHA.1672@TK2MSFTNGP12.phx.gbl...
> > > The following code should get you going (get a new event from NT event
> > log)
> > > ...
> > >
> > >
> > > public class EventDrv
> > > {
> > > public EventDrv(){}
> > > public void Exec()
> > > {
> > > try
> > > {
> > > String remoteMachine = "machine";
> > > String username = @"domain\user";
> > > String password = @"password";
> > > string strQuery = "SELECT * FROM __InstanceCreationEvent where
> > > TargetInstance isa \"Win32_NTLogEvent\"";
> > > ConnectionOptions co = new ConnectionOptions();
> > > co.EnablePrivileges = true;
> > > co.Impersonation = ImpersonationLevel.Impersonate;
> > > co.Username = username;
> > > co.Password = password;
> > > System.Management.ManagementScope ms = new
> > > System.Management.ManagementScope("\\\\" + remoteMachine +
> > > "\\root\\cimv2", co);
> > > eventclass ev = new eventclass();
> > >
> > > EventQuery eq = new EventQuery(strQuery );
> > > ManagementEventWatcher ew = new ManagementEventWatcher(ms,eq);
> > > ew.EventArrived +=new
EventArrivedEventHandler(ev.ew_EventArrived);
> > > ew.Start();
> > > }
> > > catch(Exception e1)
> > > {
> > > Console.WriteLine(e1.Message );
> > > }
> > > }
> > > }
> > > public class eventclass
> > > {
> > > public void ew_EventArrived(object sender, EventArrivedEventArgs e)
> > > {
> > > Console.WriteLine("Event arrived !");
> > > }
> > > }
> > >
> > > --
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > >
> > >
> > > "Leo" <kbumbaz@yahoo.fr> wrote in message
> > > news:4033c362$0$28110$626a14ce@news.free.fr...
> > > > where I can find more info ... my directive is to whrite something
in
> C#
> > !
> > > > Ok for C# but I don't know WMI !
> > > >
> > > > tanks a lot !
> > > > "Sarika Sharma[MSFT]" <sarikas@online.microsoft.com> a écrit dans le
> > > message
> > > > de news:uxHLr6k9DHA.3880@TK2MSFTNGP11.phx.gbl...
> > > > > Yes if the user trying to remote with has sufficient privileges
you
> > can
> > > > > make use of wmi class win32_ntlogevent in root\cimv2 namespace
> > > > >
> > > > > --
> > > > > Sarika Sharma [MSFT]
> > > > > WMI Test Engineer
> > > > > This posting is provided "As Is" with no warranties, and confers
no
> > > > rights.
> > > > > Use of included script samples are subject to the terms specified
at
> > > > > http://www.microsoft.com/info/cpyright.htm
> > > > > Please do not send e-mail directly to this alias. This alias is
for
> > > > > newsgroup purposes only.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "Leo" <kbumbaz@yahoo.fr> wrote in message
> > > > > news:40328461$0$28615$626a14ce@news.free.fr...
> > > > > > I would like to know if wmi can return me the list of the events
> on
> > a
> > > > > remote
> > > > > > computer ?
> > > > > >
> > > > > > tanks !
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: Steve Predmore: "Re: WMICORE.exe hangs"
- Previous message: Leo: "Re: WMI & Events on Computers"
- In reply to: Leo: "Re: WMI & Events on Computers"
- Next in thread: Leo: "Re: WMI & Events on Computers"
- Reply: Leo: "Re: WMI & Events on Computers"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|