473,407 Members | 2,312 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,407 software developers and data experts.

EventViewer switch to specify directory to read logs from?

Is there a command line switch available for the EventViewer which will allow
me to specify which directory to view the available logs from?

I will have multiple workstations writing to a mirrored set of really large
flash drives. The workstations will write to their specific standard .evt
files. I need to be able to start EventViewer and specify which
workstations's logs to go view at startup.

Is this possible w/o creating my own custom EventViewer?
Jun 5 '07 #1
3 2578
CD.Smalley wrote:
Is there a command line switch available for the EventViewer which will allow
me to specify which directory to view the available logs from?

I will have multiple workstations writing to a mirrored set of really large
flash drives. The workstations will write to their specific standard .evt
files. I need to be able to start EventViewer and specify which
workstations's logs to go view at startup.

Is this possible w/o creating my own custom EventViewer?
This is not really a csharp question. Looking at the help file for the
Event Viewer, there is the following:

Open Command Prompt.
Type:
eventquery[.vbs] [-?] [-s Computer [-u Domain\User [-p Password]]] [-fi
FilterName ] [-fo {TABLE|LIST|CSV}] [-r EventRange [-nh] [-v] [-l
{APPLICATION|SYSTEM|SECURITY|"DNS Server"|LOG|DirectoryLogName|*}]

Value Description
-? Displays Help on Eventquery.vbs
-s Computer Specifies the name of one or more remote computers (no
backslashes). The default is the local computer.
-u Domain\User This is used when a password is required.
-p Password This is used when required by network security policy.
-fi FilterName Specifies the types of events to include in or exclude
from the query.
-fo {TABLE|LIST|CSV} The format to use for the output.
-r EventRange The range of events to list.
-nh Supresses column headers in the output of table and .csv formats.
-v Specifies that verbose task information be displayed in the output.
-l {APPLICATION|SYSTEM|SECURITY|"DNS Server"|LOG|DirectoryLogName|*}
Specifies the logs to monitor.

Notes

To open a command prompt, click Start, point to All Programs, point to
Accessories, and then click Command Prompt.
To view the complete syntax for this command, at a command prompt, type:

eventquery.vbs -?

The other computer can be a workstation running Windows XP Home Edition,
Windows XP Professional, Windows 2000 Professional, or Windows NT
Workstation, or a server or domain controller running Windows 2000
Server, Windows NT Server, or a LAN Manager 2.x server.
The following are valid for use with the -fi FilterName value:

Datetime eq, ne, ge, le, gt, lt mm/dd/yy(yyyy), hh:mm:ssAM(/PM)
Type eq, ne ERROR|INFORMATION|WARNING|SUCCESSAUDIT|FAILUREAUDI T
ID eq, ne, ge, le, gt, lt non-negative integer
User eq, ne Any valid string.
Computer eq, ne Any valid string.
Source eq, ne Any valid string.
Category eq, ne Any valid string
--
Tom Porterfield
Jun 5 '07 #2
Tom,

MS Conceirge Chat sent me here. I didn't quite know where to post so I
chose the language I'm working with. If there is a better spot, please
advise.

In regards to the Help file. I've been there and done that one. Not quite
what I need. I don't need to specify a different computer. I need to
specify where on a drive the logs are for EventViewer to go look at.

Still looking...

Thanks
CD

"Tom Porterfield" wrote:
CD.Smalley wrote:
Is there a command line switch available for the EventViewer which will allow
me to specify which directory to view the available logs from?

I will have multiple workstations writing to a mirrored set of really large
flash drives. The workstations will write to their specific standard .evt
files. I need to be able to start EventViewer and specify which
workstations's logs to go view at startup.

Is this possible w/o creating my own custom EventViewer?

This is not really a csharp question. Looking at the help file for the
Event Viewer, there is the following:

Open Command Prompt.
Type:
eventquery[.vbs] [-?] [-s Computer [-u Domain\User [-p Password]]] [-fi
FilterName ] [-fo {TABLE|LIST|CSV}] [-r EventRange [-nh] [-v] [-l
{APPLICATION|SYSTEM|SECURITY|"DNS Server"|LOG|DirectoryLogName|*}]

Value Description
-? Displays Help on Eventquery.vbs
-s Computer Specifies the name of one or more remote computers (no
backslashes). The default is the local computer.
-u Domain\User This is used when a password is required.
-p Password This is used when required by network security policy.
-fi FilterName Specifies the types of events to include in or exclude
from the query.
-fo {TABLE|LIST|CSV} The format to use for the output.
-r EventRange The range of events to list.
-nh Supresses column headers in the output of table and .csv formats.
-v Specifies that verbose task information be displayed in the output.
-l {APPLICATION|SYSTEM|SECURITY|"DNS Server"|LOG|DirectoryLogName|*}
Specifies the logs to monitor.

Notes

To open a command prompt, click Start, point to All Programs, point to
Accessories, and then click Command Prompt.
To view the complete syntax for this command, at a command prompt, type:

eventquery.vbs -?

The other computer can be a workstation running Windows XP Home Edition,
Windows XP Professional, Windows 2000 Professional, or Windows NT
Workstation, or a server or domain controller running Windows 2000
Server, Windows NT Server, or a LAN Manager 2.x server.
The following are valid for use with the -fi FilterName value:

Datetime eq, ne, ge, le, gt, lt mm/dd/yy(yyyy), hh:mm:ssAM(/PM)
Type eq, ne ERROR|INFORMATION|WARNING|SUCCESSAUDIT|FAILUREAUDI T
ID eq, ne, ge, le, gt, lt non-negative integer
User eq, ne Any valid string.
Computer eq, ne Any valid string.
Source eq, ne Any valid string.
Category eq, ne Any valid string
--
Tom Porterfield
Jun 5 '07 #3
Hi CD,

As far as I know, you can only open an .evt file from Event Viewer
interface, it's also required to specify the file's log type
(application/security/system, etc.)

Sorry I cannot help much since it's not a development related question. You
may want to try other newsgroups such as windowsxp.general.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 6 '07 #4

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

Similar topics

6
by: o'seally | last post by:
solaris/linux admins/rookie_developers that battle with this error are probably all frustrated when it happens. i bet you're also somehow frustrated by this seemingly unsolvable error :-) ...take...
3
by: pgraeve | last post by:
I am a convert from VB to C# so bear with me on this "conversion" question C# switch statement seems to be the closest relative to VB's Select Case. I used VB's Select Case statement liberally. ...
2
by: Hari | last post by:
Hi I have an ASP.NET application that writes to a log file in a directory outside the webapp directory (e.g. c:\program files\myapp\logs). OS is Windows 2003 If I see the list of users in the...
1
by: Marie Mercier | last post by:
Hi, Does anyone know how to dectect the fact that an entry was just made in the Event Viewer? I need to catch and filter these logs as soon as they are written. thanks -- Marie
2
by: Scott | last post by:
I'm creating an intranet site that uses Forms authentication to validate users against an Active Directory. Users need to be able to login both from work and remotely. Then I want to be able to do...
9
by: Eugene F | last post by:
The database is currently in the circular logging mode (no log archiving). I want to track the database transaction log switch history in form of (switch-timestamp, active-log-sequence-number) to...
0
by: phil469 | last post by:
I'm having an issue when trying to read a file in a user's homedir from a cgi script. I have a virtual host section in my httpd.conf file which I'll include. The cgi script is a very basic script...
6
by: subaruwrx88011 | last post by:
Hello, I am having alot of trouble. I am trying to log some information in text file form to directory /data/logs. Here is pseudo code std::string const M_LOG_PATH = "\\data\\logs\\"; ...
9
by: Gordon | last post by:
I want to add a feature to a project I'm working on where i have multiple users set up on my Postgres database with varying levels of access. At the bare minimum there will be a login user who...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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...
0
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...
0
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...
0
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,...
0
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...

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.