473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Help: EventLog from clonned drive.

I have a second drive on my PC that's a clone of Drive 0.

I would like to be view of the system event logs on the other drive:

"E:\WINDOWS\system32\config\SysEvent.Evt"

This code can't do that:

I can't just: //EventLog log1 = new
EventLog(@"E:\WINDOWS\system32\config\SysEvent.Evt ");

EventLog log1 = new EventLog("System");

foreach (System.Diagnostics.EventLogEntry entry in
log1.Entries)

{

if (
entry.TimeWritten.Month.ToString().IndexOf("11") > -1) //for November Only

if (
entry.TimeWritten.Year.ToString().IndexOf("2005") > -1) //of 2005

this.listBox1.Items.Add(entry.Message +
" " + entry.TimeWritten);

}

Jim
Nov 17 '05 #1
0 978

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

Similar topics

5
by: timb | last post by:
Hi, am creating a windows service using c# and would like it to create a new eventlog logtype and add it to the eventlog viewer so that i can log all messages relating to this application to this...
4
by: Tressa | last post by:
I have a messagebox that I only want to pop up only if it is not already being displayed on the screen. My code is still poping up the messagebox even though it is on the screen. What am I doing...
5
by: roopeman | last post by:
i wrote the below code , just want got local machine application Eventlog 's message , and write to MDB.but it 's can not write the message to Mdb, somebody can check it for me? thanks! ...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
5
by: Andrew | last post by:
Hey all, Requesting help from the VB.Net gurus in here. I was given a task to write a Windows Service (VB.Net) that would run an external program, and if that program closed for any reason...
9
by: sandlovic | last post by:
Hi, I am trying to access a website which seems to be writen in PHP http://tools.neb.com/NEBcutter2/index.php However, neither IE nor firefox would load the page. I am running WinXP SP2 and IE...
1
by: martin | last post by:
Hi, I'm having some problems with the System.Diagnostics.EventLog class in .NET 2.0 I need to recreate an event message source inside a new log but the messages keeps ending up in the old...
8
by: John | last post by:
Is there any special code I have to write to log event to Security Event Log? The following code give me "Very Easy Question, How to write log to SECURTY Event Log? Please help" Error // Create...
2
by: =?Utf-8?B?U3RldmU=?= | last post by:
Hello all, I need to find all the distribution lists/groups a user is a member of using Active Directory when they request an INTRANET webpage. Impersonation is DISABLED on this site. I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...

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.