473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Application KeepAlive?

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.

Jul 11 '06 #1
3 1759
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
Jul 11 '06 #2

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:
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
Jul 11 '06 #3
The applicaiton will run on a machine that is always logged on

Jul 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: unni | last post by:
Whats The Other Option For Keeping Connection Alive ? Since Http.keepalive = True Is Not Working In The Code. Is There Any Thing More Required Along With The Http.keepalive = True
20
by: Michael A. Covington | last post by:
See: http://www.ai.uga.edu/mc/SingleInstance.html While attempting to use a mutex to allow only one instance of my app to run at a time (Recipe 4.12 in C# Programmer's Cookbook), I found that if...
8
by: Gaetan | last post by:
Hi let this code : using System; using System.Threading; namespace ThisNamespace { class ThisClass
0
by: Kevin | last post by:
Hi, How can you set up the timeout values of the KeepAlive Socket option like you do using WSAIoctl and SIO_KEEPALIVE_VALS using C++ ? Searching about this I found several post of people using...
0
by: Ziphyre | last post by:
Hi, I can't send 'Connection: Keep-Alive' property in the second connection of my HttpWebRequest. Suppose: HttpWebRequest hreq = ..... hreq.KeepAlive = true; HttpWebResponse hresp =...
0
by: daryl | last post by:
I have a situation where a webservice has worked fine in a development environment, but when placed into production has stopped working (although at one time it was). Using WSE 2.0/DIME, we...
1
by: okaminer | last post by:
Hi This is for the experts I have override the GetWebRequest method and set the keepalive property to false in order to overcome a certain in .NET web service problem. My problem now is that...
2
by: Volker Hetzer | last post by:
Hi! I've got a problem with the GC.keepalive function, as used in the examples at http://msdn2.microsoft.com/en-US/library/system.gc.keepalive.aspx .. There they have a class "Example",...
2
by: Atmapuri | last post by:
Hi! I was looking at the details of how KeepAlive works to handle my unmanaged code interop. Several question came up. Assuming I have: public Test2(Object a) { }
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.