W
Wayne
Hi
I created a VBS Windows Host Script to backup the security
log on a server. It backs up the file, but when I try to
open it in Event Viewer, I get the error:
Unable to complete the operation on "Saved System
Log" The event log file is corrupted.
I also tried going into c:\WINNT\system32\config\ myself.
I copied the security log, and tried opening it in event
viewer. I got the same error message.
Does the event log service need to be temporarily stopped
while I make copies of the event logs? If so, I wonder how
I can do that using VBS scripting?
Here is my code:
Dim FSO, MyDate
Set FSO = CreateObject("Scripting.FileSystemObject")
MyDate = Month(now) & "-" & Day(now) & "-" & Year(now)
FSO.CopyFile "c:\WINNT\system32
\config\SecEvent.Evt", "e:\Security Log Archive\" & _
MyDate & " SecEvent.Evt"
Set FSO = Nothing
Set MyDate = Nothing
WScript.Quit(1)
I created a VBS Windows Host Script to backup the security
log on a server. It backs up the file, but when I try to
open it in Event Viewer, I get the error:
Unable to complete the operation on "Saved System
Log" The event log file is corrupted.
I also tried going into c:\WINNT\system32\config\ myself.
I copied the security log, and tried opening it in event
viewer. I got the same error message.
Does the event log service need to be temporarily stopped
while I make copies of the event logs? If so, I wonder how
I can do that using VBS scripting?
Here is my code:
Dim FSO, MyDate
Set FSO = CreateObject("Scripting.FileSystemObject")
MyDate = Month(now) & "-" & Day(now) & "-" & Year(now)
FSO.CopyFile "c:\WINNT\system32
\config\SecEvent.Evt", "e:\Security Log Archive\" & _
MyDate & " SecEvent.Evt"
Set FSO = Nothing
Set MyDate = Nothing
WScript.Quit(1)