473,624 Members | 2,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query Local Event Log (with WMI)?


Different parts of a locally-installed application write to the same
custom event log. I would like to query the log and write the data to
an XML string. Can anyone show how that could be done?

Thanks.

Jun 27 '08 #1
2 1542
Hello,

from .NET you can use the EventLog class. It has an Entries property giving
you access to the entries.

Kind regards,
Henning Krause

"coconet" <co*****@commun ity.nospamwrote in message
news:5b******** *************** *********@4ax.c om...
>
Different parts of a locally-installed application write to the same
custom event log. I would like to query the log and write the data to
an XML string. Can anyone show how that could be done?

Thanks.
Jun 27 '08 #2
Done deal, thanks.

On Mon, 28 Apr 2008 19:58:53 +0200, "Henning Krause [MVP - Exchange]"
<ne************ ***@this.infini tec.dewrote:
>Hello,

from .NET you can use the EventLog class. It has an Entries property giving
you access to the entries.

Kind regards,
Henning Krause

"coconet" <co*****@commun ity.nospamwrote in message
news:5b******* *************** **********@4ax. com...
>>
Different parts of a locally-installed application write to the same
custom event log. I would like to query the log and write the data to
an XML string. Can anyone show how that could be done?

Thanks.
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
14598
by: Mark Hoffman | last post by:
I'm a newbie at Oracle..Be gentle! I have a table that stores information (WMI data) about computers on our network. The table looks like: ComputerID ItemID Class Property Value
2
2746
by: Alexander Wehrli | last post by:
Hi all, I wanted to design a wmi query that returns me a list of all "real" user accounts defined on the local machine. As you may know, the accounts are defined in win32_account. The field SIDType indicates what kind of account it is(user, group, Domain, etc.). (On MSDN: http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_account.asp) This results in the following query --> "select * from win32_account where SIDType=1"
0
2297
by: David | last post by:
Hi, I have a problem about my ASP .NET App(C# .NET) to query SMS2003 via WMI. My web server is IIS 6.0 on Win2003 Svr SP1(Domain Controller-AD + SMS2003 SP1). In my btn_cliclk method, my query code is as below. My question is, the first query gets correct result, the server and site name, while the second query get a
6
1859
by: Christopher C | last post by:
I am currently working on an app the will be a shell replacement. Part of the goal is to list the current network status; basically I need to know if the network card is plugged in. I am currently using WMI to query all adapters to see if they have a connected status. The status is updated every 30minutes. I noticed this is leaking memory. I am looking for suggestions. I am running this on an asynchronous thread call with callbacks to a...
7
3327
by: gel | last post by:
Below is how it is down with vbscript. What is the best way to convert this to python? strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colMonitoredProcesses = objWMIService. _ ExecNotificationQuery("select * from __instancecreationevent " _ & " within 1 where TargetInstance isa 'Win32_Process'")
9
7761
by: Adrian Dev | last post by:
Hi, I have succesfully used a ManagementScope object to get WMI information about workstations on the current domain using "//xp10/root/cimv1". But if I make a request to a workstation on a sub-domain, the command fails to connect with "Access denied". Do I need to alter the string somehow to include the sub domain name or could this be a rights issue ? Thanks in advance, Adrian
3
6819
by: Marc Gravell | last post by:
I would like to query (where possible) the power consumption of the local PC. Obviously this requires hardware support, but similar apps leads me to believe that this is possible. I looked at wmi (below) but this is empty on my XP machines... any other ideas on how to get this data? If it is even possible... TIA, Marc
6
10074
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005 and .net 2.0. I currently prcoess each Security Log entry one by one to extract those that fit the selection criteria. Is there a function that I can use to query the entries with option of filtering for certain event id and/or time period in C#? Thanks.
0
851
by: mrig123 | last post by:
Hi, I am searching for ways to create event query combining two wmi classes. How can I do that? Please reply. Regards, Mrig123
0
8234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8172
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8677
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8620
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8474
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7158
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.