Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

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
0
bsharath
Asked:
bsharath
1 Solution
 
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
 
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now