J
james
I am new to scripting using WScript/Cscript. When I run
the script to Backing Up and Clearing Event Logs If the
Log Meets Specific Conditions i get the following error:
->terminated entity reference - matching ';' not found
I have successfully loaded Windows Script V5.6 on a
Windows NT 4.0 Build 1381. I need this script to run
successfully on Windows 2000.
Script below:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate, (Backup,
Security)}!\\" _
& strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("SELECT * FROM Win32_NTEventLogFile")
For Each objLogfile in colLogFiles
If objLogFile.FileSize > 20000000 Then
strBackupLog = objLogFile.BackupEventLog _
("c:\scripts\" & objLogFile.LogFileName
& ".evt")
objLogFile.ClearEventLog()
End If
Next
the script to Backing Up and Clearing Event Logs If the
Log Meets Specific Conditions i get the following error:
->terminated entity reference - matching ';' not found
I have successfully loaded Windows Script V5.6 on a
Windows NT 4.0 Build 1381. I need this script to run
successfully on Windows 2000.
Script below:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate, (Backup,
Security)}!\\" _
& strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("SELECT * FROM Win32_NTEventLogFile")
For Each objLogfile in colLogFiles
If objLogFile.FileSize > 20000000 Then
strBackupLog = objLogFile.BackupEventLog _
("c:\scripts\" & objLogFile.LogFileName
& ".evt")
objLogFile.ClearEventLog()
End If
Next