'Sending log message to the WhatsUp Event Viewer Context.LogMessage "Checking Address=" & Context.GetProperty("Address") 'Set the result code of the check (0=Success, 1=Error) Context.SetResult 0, "File Does Not Exist. No Action Required" strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colFiles = objWMIService.ExecQuery _ ("Select * From CIM_Datafile Where Name = 'D:\\Test\\Test.txt'") If colFiles.Count > 0 Then Context.SetResult 1, "File Exists. Please Clear Files" End If