Const ForReading = 1 Const ForWriting = 2 Dim strLog, strDate, strTime, strSched Set objFSO = CreateObject("Scripting.FileSystemObject") strLog = "Nothing" If Not objFSO.FileExists("C:\Program Files\Tivoli\TSM\baclient\dsmsched.log") Then MsgBox "This machine is not being automatically backed up because it does not have the DSM Scheduler installed at this time." ,, "ALICE System Backup Check" WScript.Quit End If Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile _ ("C:\Program Files\Tivoli\TSM\baclient\dsmsched.log", ForReading) Do Until objTextFile.AtEndOfStream strLine = objTextFile.ReadLine intFailure = InStr(strLine, "completed") If intFailure > 0 Then strLog = strLine End If Loop objTextFile.Close strSched = Mid(strLog, 38, 8) strDate = Left(strLog, 10) strTime = Mid(strLog, 12, 8) If strLog = "Nothing" Then MsgBox "This machine is not being automatically backed up because it is not currently associated with a backup schedule." ,, "ALICE System Backup Check" Else MsgBox "This machine was last backed up by the " & strSched + " backup schedule at " & strTime + " on " & strDate + "." ,, "ALICE System Backup Check" End If