Polling Another App

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Scott McNair

    Polling Another App

    Hi,

    I've got two applications. The job of the second application is to make
    sure that the first application is running; if it's not, it relaunches it.

    Is there a good code snippet that somebody can point me to that would
    accomplish this?

    Regards,
    Scott
  • Scott McNair

    #2
    Re: Polling Another App

    Scott McNair <smcnair@beache xpress.takethis partout.comwrot e in
    news:Xns9A5E70B 958ADdonquixote 235gmailco@207. 46.248.16:
    Is there a good code snippet that somebody can point me to that would
    accomplish this?
    As is the case a lot of times, I found the solution within a minute of
    posting the question:

    Private Sub CheckForApp()
    Dim myProcesses() As Process
    myProcesses = Process.GetProc essesByName("My App")
    If myProcesses.Len gth = 0 Then
    'Launch the app
    System.Diagnost ics.Process.Sta rt("P:\ath\to\M yApp.exe")
    End If
    End Sub

    Comment

    Working...