Keep a monitor on a machine.

Posted on 2007-07-25
Last Modified: 2010-03-05

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.

Question by:bsharath
    LVL 13

    Expert Comment

    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.
    LVL 11

    Author Comment

    Any code for this...
    LVL 23

    Accepted Solution

    You should be able to run this script on your machine

    ' ****************************************************************
    ' This function checks if a process is running on a (remote)
    ' Requires WMI
    ' *****************************************************************
    ' Check out 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( ) = UCase( strProcess ) Then
                IsProcessRunning = True
                Exit Function
            End If
    End Function

    ' ****************************************************************************
    ' Main
    ' ****************************************************************************
    Dim strComputer, strProcess
       strProcess = inputbox( "Please enter the name of the process (for instance: explorer.exe)", "Input" )
    Loop until strProcess <> ""
       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
        WScript.Echo "Process " & strProcess & " is NOT running on computer " & strComputer
    End If

    Featured Post

    Free book by J.Peter Bruzzese, Microsoft MVP

    Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

    Join & Write a Comment

    This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
    Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
    In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now