I found the following article by Microsoft, Backing Up and Clearing Event
Logs, for Microsoft® Windows® 2000 Scripting Guide, located here . . .
http://www.microsoft.com/technet/scr....mspx?mfr=true
This article includes a section titled, 'Listing 12.5 Backing Up and
Clearing an Event Log' that details the following script:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Backup)}!\\" & _
strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("SELECT * FROM Win32_NTEventLogFile WHERE LogFileName='Application'")
For Each objLogfile in colLogFiles
errBackupLog = objLogFile.BackupEventLog("c:\scripts\application.evt")
If errBackupLog <> 0 Then
Wscript.Echo "The Application event log could not be backed up."
Else
objLogFile.ClearEventLog()
End If
Next
Unfortunately, this script did not work. When executed, a Windows Script
Host pop-up window states: The Application event log could not be backed up.
It seems reasonable to conclude that this script fails because this article
applies to Windows 2000 and not Windows XP SP2 (as is my operating system).
Next, I Googled . . . "Backing Up and Clearing Event Logs" "Microsoft
Windows XP Scripting Guide" . . . but it produced not hits.
A few Googles later, I found . . .
http://www.microsoft.com/technet/scr....mspx?mfr=true
.. . . which states that it supports the Windows XP platform (among others)
and includes the following script:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Backup)}!\\" & _
strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile where LogFileName='Application'")
For Each objLogfile in colLogFiles
errBackupLog = objLogFile.BackupEventLog("c:\scripts\application.evt")
If errBackupLog <> 0 Then
Wscript.Echo "The Application event log could not be backed up."
Else
objLogFile.ClearEventLog()
End If
Next
Unfortunately, like the Windows 2000 script, it did not work. When
executed, a Windows Script Host pop-up window states: The Application event
log could not be backed up.
Looks like its back to the drawing board, for me.
AM

(