If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#31
|
|||
|
|||
Application, Security and System log files - where are they located
Thank you for responding to my newsgroup posting and for sharing your 2 ¢,
Twayne. I do not know a thing about script writing, but am happy to report that the Security script worked. One down, two to go!! Attempting to capitalize on this achievement, I substituted SYSTEM for SECURITY and created a separate .vbs file. When executed, the following Windows Script Host pop-up states: Script: C:\clearSYS.vbs Line: 2 Char: 1 Error: 0x80041021 Code: 80041021 Source: (null) Similarly, I substituted APPLICATION for SECURITY and created a separate ..vbs file. When executed, the following Windows Script Host pop-up states: Script: C:\clearAPP.vbs Line: 2 Char: 1 Error: 0x80041021 Code: 80041021 Source: (null) Prior to researching the Error and Code numbers, I thought I would post my results with the hope there is a simple solution that someone here may know. Thanks again for sharing your 2 ¢, Twayne! AM "Twayne" wrote in message ... SNIP SNIP SNIP How about the Script to clear the Security event log after backing it up: http://www.winhelponline.com/article...ing-it-up.html link? It has a script that looks like it would work. Just my 2 ¢ |
Ads |
#32
|
|||
|
|||
Application, Security and System log files - where are they located
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 ( |
#33
|
|||
|
|||
Application, Security and System log files - where are they located
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 ( |
#34
|
|||
|
|||
Application, Security and System log files - where are they located
Have you tried the keystroke macro?
-- JS http://www.pagestart.com "AnnaMarie" wrote in message ... 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 ( |
#35
|
|||
|
|||
Application, Security and System log files - where are they located
Have you tried the keystroke macro?
-- JS http://www.pagestart.com "AnnaMarie" wrote in message ... 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 ( |
#36
|
|||
|
|||
Application, Security and System log files - where are they located
Hi JS,
Due to its cost, I chose to go the freeware route and downloaded a similar product, highly taughted by the editors of CNET, AutoHotkey 1.0.48 Beta. It did not work. Hell, it did not install properly either. I tired downloading again, but ended up with the same result. AM "JS" @ wrote in message ... Have you tried the keystroke macro? -- JS |
#37
|
|||
|
|||
Application, Security and System log files - where are they located
Hi JS,
Due to its cost, I chose to go the freeware route and downloaded a similar product, highly taughted by the editors of CNET, AutoHotkey 1.0.48 Beta. It did not work. Hell, it did not install properly either. I tired downloading again, but ended up with the same result. AM "JS" @ wrote in message ... Have you tried the keystroke macro? -- JS |
#38
|
|||
|
|||
Application, Security and System log files - where are they located
|
#39
|
|||
|
|||
Application, Security and System log files - where are they located
|
#40
|
|||
|
|||
Application, Security and System log files - where are they located
It's a "Beta" version which means it come with bugs.
See if you find the earlier (no beta version) and try it. Un-install the beta before installing and other version. -- JS http://www.pagestart.com "AnnaMarie" wrote in message ... http://www.download.com/AutoHotkey/3...html?tag=mncol |
#41
|
|||
|
|||
Application, Security and System log files - where are they located
It's a "Beta" version which means it come with bugs.
See if you find the earlier (no beta version) and try it. Un-install the beta before installing and other version. -- JS http://www.pagestart.com "AnnaMarie" wrote in message ... http://www.download.com/AutoHotkey/3...html?tag=mncol |
#42
|
|||
|
|||
Application, Security and System log files - where are they located
Thu, 5 Feb 2009 18:14:27 -0600 from AnnaMarie :
Due to its cost, I chose to go the freeware route and downloaded a similar product, highly taughted by the editors of CNET, AutoHotkey 1.0.48 Beta. It did not work. Hell, it did not install properly either. I tired downloading again, but ended up with the same result. Autohotkey has been a champ for me and for every friend and relative I've recommended it to. None of us had any trouble installing it or using it. -- Stan Brown, Oak Road Systems, Tompkins County, New York, USA http://OakRoadSystems.com Shikata ga nai... |
#43
|
|||
|
|||
Application, Security and System log files - where are they located
Thu, 5 Feb 2009 18:14:27 -0600 from AnnaMarie :
Due to its cost, I chose to go the freeware route and downloaded a similar product, highly taughted by the editors of CNET, AutoHotkey 1.0.48 Beta. It did not work. Hell, it did not install properly either. I tired downloading again, but ended up with the same result. Autohotkey has been a champ for me and for every friend and relative I've recommended it to. None of us had any trouble installing it or using it. -- Stan Brown, Oak Road Systems, Tompkins County, New York, USA http://OakRoadSystems.com Shikata ga nai... |
#44
|
|||
|
|||
Application, Security and System log files - where are they located
Thank you, JS, I also was aware of Beta issues.
However, no earlier version was readily available at downloads.com and given the long history of freeware, the Beta version should have installed properly. It is quite confusing and I may have to try it again. Both failed attempts were installed with ZERO programs running in the background - in fact, a fresh boot with ZERO startup programs. Course, ZERO startup programs is a bit of a LAFF for me because, in this regard, I run a LEAN and MEAN startup with only four programs including 'point32 - a Microsoft Trackball Mouse, stsystra - a SigmaTel C-Major Audio Tray Application (a program that I believe I do not need to include in startup, though by default, on my XP SP2 Dell, it loads anyway), a program called Tiny Watcher and another called HDTVScheduler. Thanks for your continued encouragement, JS. ) AnnaMarie "JS" @ wrote in message ... It's a "Beta" version which means it come with bugs. See if you find the earlier (no beta version) and try it. Un-install the beta before installing and other version. -- JS |
#45
|
|||
|
|||
Application, Security and System log files - where are they located
Thank you, JS, I also was aware of Beta issues.
However, no earlier version was readily available at downloads.com and given the long history of freeware, the Beta version should have installed properly. It is quite confusing and I may have to try it again. Both failed attempts were installed with ZERO programs running in the background - in fact, a fresh boot with ZERO startup programs. Course, ZERO startup programs is a bit of a LAFF for me because, in this regard, I run a LEAN and MEAN startup with only four programs including 'point32 - a Microsoft Trackball Mouse, stsystra - a SigmaTel C-Major Audio Tray Application (a program that I believe I do not need to include in startup, though by default, on my XP SP2 Dell, it loads anyway), a program called Tiny Watcher and another called HDTVScheduler. Thanks for your continued encouragement, JS. ) AnnaMarie "JS" @ wrote in message ... It's a "Beta" version which means it come with bugs. See if you find the earlier (no beta version) and try it. Un-install the beta before installing and other version. -- JS |
Thread Tools | |
Display Modes | |
|
|