Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Managing event log

Reply
 
Old 12-20-2008   #1 (permalink)
Joe Blow


 
 

Managing event log

I know how to add a custom event to an event log, I know how to export my
event log, I know how to clear my event log, but can I use VBScript to
manage the properties of the event log? i.e. The max size, overwrite
disposition (as needed, older than x days, etc.)

Thanks for any suggestions!

Joe



My System SpecsSystem Spec
Old 12-20-2008   #2 (permalink)
Richard Mueller [MVP]


 
 

Re: Managing event log

Joe wrote:
Quote:

>I know how to add a custom event to an event log, I know how to export my
>event log, I know how to clear my event log, but can I use VBScript to
>manage the properties of the event log? i.e. The max size, overwrite
>disposition (as needed, older than x days, etc.)
>
> Thanks for any suggestions!
>
Yes, see this link:

http://www.microsoft.com/technet/scr..._log_xxsk.mspx

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Old 12-20-2008   #3 (permalink)
Joe Blow


 
 

Re: Managing event log


"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in
message news:uI9xhGsYJHA.5272@xxxxxx
Quote:

>
> Yes, see this link:
>
> http://www.microsoft.com/technet/scr..._log_xxsk.mspx
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab - http://www.rlmueller.net
> --
>
Thanks Richard! I knew it was possible, was just having a heck of a time
finding the link for it.

By the way, I also want to say thanks for your site, I used your site
extensively this last week as I was working on changing my logon scripts
from KIX to VBS. Your site was more helpful than any other scripting page I
looked at.

Joe


My System SpecsSystem Spec
Old 12-20-2008   #4 (permalink)
Richard Mueller [MVP]


 
 

Re: Managing event log


"Joe Blow" <joe@xxxxxx> wrote in message
news:%23gSL3KsYJHA.5336@xxxxxx
Quote:

>
> "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in
> message news:uI9xhGsYJHA.5272@xxxxxx
Quote:

>>
>> Yes, see this link:
>>
>> http://www.microsoft.com/technet/scr..._log_xxsk.mspx
>>
>> --
>> Richard Mueller
>> MVP Directory Services
>> Hilltop Lab - http://www.rlmueller.net
>> --
>>
> Thanks Richard! I knew it was possible, was just having a heck of a time
> finding the link for it.
>
> By the way, I also want to say thanks for your site, I used your site
> extensively this last week as I was working on changing my logon scripts
> from KIX to VBS. Your site was more helpful than any other scripting page
> I looked at.
>
> Joe
>
I'm glad you found it useful.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Old 12-20-2008   #5 (permalink)
Joe Blow


 
 

Re: Managing event log

"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in
message news:uxJj7NsYJHA.6036@xxxxxx
Quote:

>
>
> I'm glad you found it useful.
It was a great place to start. Things I added:

First was speech so I could track where the script was while I was
troubleshooting it, then later added a switch to enable/disable the speech.

Then I figured out how to create an IE window for a status update since I
don't think my users would be amused for too long when their computer talks
to them every time they log on to the domain - but they might, who knows
:-)...

Then I added the status report to insert itself into the event log, if it
can't map a drive or connect a printer, the log entry is warning instead of
information.

Then I ran into an eventlog that was full, so I want to make sure the event
log is large enough (I like 4 MB instead of the default 512KB) and to
overwrite entries as needed... That's the part I'm working on now, also to
check and make sure it's not a server, those event logs are already set and
I don't want to change them so I'll have checking for that and if the log
already has the proper settings, I don't want to change it again, resulting
in a save/wipe every time they log on.



My System SpecsSystem Spec
Old 12-21-2008   #6 (permalink)
Stefan Kanthak


 
 

Re: Managing event log

"Joe Blow" <joe@xxxxxx> wrote:
Quote:

> "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in
> message news:uxJj7NsYJHA.6036@xxxxxx
[...]
Quote:

> Then I added the status report to insert itself into the event log, if it
> can't map a drive or connect a printer, the log entry is warning instead of
> information.
>
> Then I ran into an eventlog that was full, so I want to make sure the event
> log is large enough (I like 4 MB instead of the default 512KB) and to
> overwrite entries as needed...
You need administrative rights to manage the event log.
And your logon script doesn't have these rights?!

Run SeCEdit.exe once using the following template:

--- EventLog.Inf ---
[Profile Description]
.... descriptive text ...

[Version]
Revision = 1
Signature = "$CHICAGO$"

[Application Log]
; 0: Overwrite Events As Needed
; 1: Overwrite Events As Specified by Retention Days Entry
; 2: Never Overwrite Events (Clear Log Manually)
AuditLogRetentionPeriod = 0
MaximumLogSize = 4096
RestrictGuestAccess = 1

[Security Log]
AuditLogRetentionPeriod = 0
MaximumLogSize = 4096
RestrictGuestAccess = 1

[System Log]
AuditLogRetentionPeriod = 0
MaximumLogSize = 4096
RestrictGuestAccess = 1

--- EOF ---

Or use a GPO to set the resp. registry entries directly.

Stefan

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
HELP need to solve this problem asap - Unable to start event viewer/event log service Software
Boot up Issues - Critical Event Log errors - Event ID = 100, 200, 400, 307, 402 General Discussion
Managing Event Logs Software
Managing Events in Event Viewer Vista General
Windows Event Log fails to translate event description. Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46