'Variables utilized in this script are based on Log examples found at: https://support.code42.com/CrashPlan/Latest/Troubleshooting/Reading_CrashPlan_App_Log_Files (On Date 2/12/2014) Const ForReading = 1 Set dtmConvertedDate = CreateObject("WbemScripting.SWbemDateTime") strComputer = "." Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set oss = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") For Each os in oss OSvar = os.Caption Next 'File Name & Path of backup_files.log backuplog = "backup_files.log" PreVstaFilePath = "C:\Documents and Settings\All Users\Application Data\CrashPlan\log\" PostVstaFilePath = "C:\ProgramData\CrashPlan\log\" Set objFSO = CreateObject("Scripting.FileSystemObject") WkstnXP = "XP" Srvr2003 = "2003" If InStr(OSVar,WkstnXP) Then If objFSO.FileExists(PreVstaFilePath & backuplog & ".0") Then FileName = PreVstaFilePath & backuplog & ".0" Else FileName = PreVstaFilePath & backuplog End If ElseIf Instr(OSVar,Srvr2003) Then If objFSO.FileExists(PreVstaFilePath & backuplog & ".0") Then FileName = PreVstaFilePath & backuplog & ".0" Else FileName = PreVstaFilePath & backuplog End If Else If objFSO.FileExists(PostVstaFilePath & backuplog & ".0") Then FileName = PostVstaFilePath & backuplog & ".0" Else FileName = PostVstaFilePath & backuplog End If End If 'FileName & Path Output, Silenced 'wscript.echo FileName 'Verifies that CrashPlan exists (looks for backup_log.txt in path appropriate for platform) Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FileExists(FileName) Then FailEntry = "W" SuccessEntry = "I" FailLine = Left(FailEntry,1) SuccessLine = Left(SuccessEntry,1) 'Pulls the Local System Date and Converts it to match Date Format used by Crash Plan CurrentMo = Right("0"&Month(Date),2) CurrentDa = Right("0"&Day(Date),2) CurrentYe = Right(Year(Date),2) CurrentHr = Right("0" & Hour(Now), 2) CurrentMn = Right("0" & Minute(Now), 2) CurrentDN = Right(FormatDateTime(Now,3),2) CPDtTdy = CurrentYe&"/"&CurrentMo&"/"&CurrentDa&" "&CurrentHr&":"&CurrentMn&":00"&" "&CurrentDN Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile(FileName, ForReading) 'Reads backup_files.log until end of file Do Until objFile.AtEndOfStream 'Place log file line entry into string strText = objFile.ReadLine 'Extract Date of Log Entry from Crash Plan LogMo = Left (strText,4) LogMo = Right(LogMo,2) LogDa = Left(strText,7) LogDa = Right(LogDa,2) LogYr = Left(strText,10) LogYr = Right(LogYr,2) LogDN = Left(strText,18) LogDN = Right(LogDN,2) LogHr = Left(strText,16) LogHr = Right(LogHr,5) LogDt = LogYr&"/"&LogMo&"/"&LogDa&" "&LogHr&":00"&" "&LogDN 'Checks to see if Failure Noted in backup_files.log entry; If Failure, outputs the Failure line If (InStr(strText, FailLine)=1) Then 'Checks to see if the Backup Log Entry matches the System Date If (DateDiff("h",LogDt,CPDtTdy)<=24) Then wscript.echo "FAILURE: " &vbCrLf & strText &vbCrLf NoFailEntry = "SUCCESS" End If 'Checks to see if Success Noted in backup_files.log entry; If Success, outputs the Success line 'ElseIf (InStr(strText, SuccessLine)=1) Then 'Checks to see if the Backup Log Entry matches the System Date 'If (StrComp(CPDtTdy,LogDt)=0) Then 'wscript.echo "SUCCESS: " &vbCrLf & strText 'End If End If Loop objFile.Close If (DateDiff("h",LogDt,CPDtTdy)>=24) Then wscript.echo "'CrashPlan' has no Backup Entries for the past 24 hours!" &vbCrLf &vbCrLf & "IF the Backup is Configured to run today, review of the 'service.log' file may be advised" wscript.Quit(1001) ElseIf (StrComp(NoFailEntry,SUCCESS)=0) Then wscript.echo "SUCCESS: There are no Failure entries for Today's Backup" &vbCrLf &vbCrLf Else wscript.Quit(1001) End If Else Wscript.Echo "'CrashPlan' is not detected on this machine." &vbCrLf wscript.Quit(1001) End If