Keep a monitor on a machine.

Hi,

I want to know when the outlook is closed on a remote machine.Is there a way to keep a monitor on the remote machine.Once the outlook is closed to be informed.

Regards
Sharath
LVL 11
bsharathAsked:
Who is Participating?
 
Malli BoppeCommented:
You should be able to run this script on your machine

' ****************************************************************
' This function checks if a process is running on a (remote)
'computer
' Requires WMI
' *****************************************************************
' Check out http://www.activxperts.com for more samples and components
' ****************************************************************************

Function IsProcessRunning( strServer, strProcess )
    Dim Process, strObject
    IsProcessRunning = False
    strObject   = "winmgmts://" & strServer
    For Each Process in GetObject( strObject ).InstancesOf( "win32_process" )
      If UCase( Process.name ) = UCase( strProcess ) Then
            IsProcessRunning = True
            Exit Function
        End If
    Next
End Function

' ****************************************************************************
' Main
' ****************************************************************************
Dim strComputer, strProcess
Do
   strProcess = inputbox( "Please enter the name of the process (for instance: explorer.exe)", "Input" )
Loop until strProcess <> ""
Do
   strComputer = inputbox( "Please enter the computer name", "Input" )
Loop until strComputer <> ""
If( IsProcessRunning( strComputer, strProcess ) = True ) Then
    WScript.Echo "Process " & strProcess & " is running on computer " & strComputer
Else
    WScript.Echo "Process " & strProcess & " is NOT running on computer " & strComputer
End If
0
 
dhoffman_98Commented:
You may be able to write some code that watches your process table and creates an alert when there is no longer an instance of outlook.exe.
0
 
bsharathAuthor Commented:
Any code for this...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.