473,765 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2601
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|SY STEM|SECURITY|" DNS Server"|LOG|Dir ectoryLogName|* }]

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|SY STEM|SECURITY|" DNS Server"|LOG|Dir ectoryLogName|* }
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|INFORMATI ON|WARNING|SUCC ESSAUDIT|FAILUR EAUDIT
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|SY STEM|SECURITY|" DNS Server"|LOG|Dir ectoryLogName|* }]

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|SY STEM|SECURITY|" DNS Server"|LOG|Dir ectoryLogName|* }
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|INFORMATI ON|WARNING|SUCC ESSAUDIT|FAILUR EAUDIT
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.gener al.
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
16647
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 it easy, it'll go away once u've learned how to play around with a few things on your system and reorganised. i'm particulary a solaris junkie, but linux is my admiration. the issue here is Not the OS/Software, but rather the concept. first of all...
3
19739
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. Now I find myself wanting to use "Select Case" i.e., "switch" in C# regularly, but I always have to find another way b/c C#'s switch statement only allows static or integral variables. For example, I often want to use a switch statement based on the...
2
1314
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 "Security" tab for the 'logs' directory, I see that <localmachine>\Users already exists. Now, <localmachine>\ASPNET is a part of this 'Users' group. But this group does not have write access to the 'logs' directory. I think this is the default setting...
1
1244
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
1754
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 two things: (1) Check whether a user is in an AD group and (2) enforce NTFS permissions based on AD username. First scenario: "Joe" logs in to the web site from home using his domain username and password. Joe should see certain content on the...
9
3476
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 eventualy assess on the database logging volume during the database operations (OLTP). I wasn't able to find a relevant event monitor elemen for that. Any other method? Thanks -Eugene
0
6856
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 written in Perl just for testing. I believe I need to find the correct <Directory> entry or some other Directive in Apache to make this work, but I've had no luck for a week now. I've tried many different things, but w/ no luck. I even tried adding...
6
1487
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\\"; std::string m_log_file_name; std::string filename = "log.txt"
9
6281
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 only has read access to the users table so that users can log in. Once a user has been logged in successfully I want to escalate that user's access level to one appropriate to their role, which will include switching the postgres user they are...
0
9568
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
10164
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...
1
9959
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
9835
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
8833
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
7379
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...
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.