Home All Groups Group Topic Archive Search About

Application KeepAlive?

Author
11 Jul 2006 8:28 PM
Webbyz
Hello everyone. I would like to develop a program in VB.NET that will
look for an instance of a running application and if the application is
not running, the new program will execute the application and open it.

There is a program out there called KeepAlive that does this but the
thing is that when I open a different window in the program that is not
the main page after the load, it recognizes this new page as "Non
Responsive".....Kills the Program...and Restarts it. This will not
work.

So basically lets say every 2 minutes, the new program looks to see if
Solitaire is open. If it is, do nothing. Else If Solitaire <> Open then
Execute Sol.exe .

Something to that extent.

I am looking to see how I can do this by reading what applicaitons are
currently running and I have no idea how to do so. I figure I can
inport all of the application names and look for a wild card of the
specific program that I want to always be open.

If anyone has any insight on this, please let me know....I would
apperciate it a lot.

Author
11 Jul 2006 8:43 PM
iwdu15
take a look at the Process item. you can get all running processes and the
you can get (i think its an array, i have a program at home that does this)
of the running ones. if your process isnt running, just create a new one,
once again using the Process item. i can send you an example soon if you
want. mine does just the opposite, it looks for an AIM process (no, its not a
virus, jsut for use on a work computer) and if it finds one, it exits the
process
--
-iwdu15
Author
11 Jul 2006 8:52 PM
tommaso.gastaldi
Imports System.Diagnostics
....
For Each p As Process  In Process.GetProcesses
    '...
Next

Also I guess you want to implement it as a service, as probably you do
not
want need to be logged in (right?).

-tom

iwdu15 ha scritto:

Show quoteHide quote
> take a look at the Process item. you can get all running processes and the
> you can get (i think its an array, i have a program at home that does this)
> of the running ones. if your process isnt running, just create a new one,
> once again using the Process item. i can send you an example soon if you
> want. mine does just the opposite, it looks for an AIM process (no, its not a
> virus, jsut for use on a work computer) and if it finds one, it exits the
> process
> --
> -iwdu15
Author
12 Jul 2006 1:35 PM
Webbyz
The applicaiton will run on a machine that is always logged on