strComputer = "." Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/cimv2") Set objEventSource = objWMIService.ExecNotificationQuery _ ("SELECT * FROM __InstanceOperationEvent WITHIN 5 WHERE TargetInstance ISA 'Win32_Process'") Do While True Set objEventObject = objEventSource.NextEvent() If Right(objEventObject.TargetInstance.Name, 4) = ".scr" Then Select Case objEventObject.Path_.Class Case "__InstanceCreationEvent" Wscript.Echo "Screensaver " & objEventObject.TargetInstance.Name & _ " started: " & Now Case "__InstanceDeletionEvent" Wscript.Echo "Screensaver " & objEventObject.TargetInstance.Name & _ " ended: " & Now End Select End If Loop