General discussion

Locked

Program Running Check

By bfishell ·
Hi,
I was curious as to what ways there are to check if a program is running, like say with a batch file. Thanks.

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Program Running Check

by TINK In reply to Program Running Check

What OS are you running? If you are using Windows 2000/NT, you can open up Task Manager and click on Applications or Processes to see what Applications or Processes are currently running.

Collapse -

Program Running Check

by bfishell In reply to Program Running Check

The question was auto-closed by TechRepublic

Collapse -

Program Running Check

by bfishell In reply to Program Running Check

I am running Windows 9X. What I want to do is to write a program to keep an application running if the application would bomb out.

Collapse -

Program Running Check

by handibear In reply to Program Running Check

and in linux/unix , you can type ps to check it.

Collapse -

Program Running Check

by bfishell In reply to Program Running Check

The question was auto-closed by TechRepublic

Collapse -

Program Running Check

by sl-campbell In reply to Program Running Check

If I understand this right, then this wouldn't be advisable, unless the user is never allowed to end the program.

There is an API call that can be used to check if a certain program is already running, and, in a program, you could start the application that you are taking about and check if it is still running. But, what if the app. didn't "Bomb out", but the user just decided to end the application? How do you check for this?

Start a program and wait until it ends:
Private Declare Function GetModuleUsage Lib "Kernel32" Alias "GetModuleUsage" (ByVal hModule As Integer) As Integer

See if a program is (still) running:
API calls Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

you can go to:
http://www.google.com

and find more.

Post a comment to your question if you still want more info, and I will respond with a comment if my question hasn't been rejected yet....

Collapse -

Program Running Check

by bfishell In reply to Program Running Check

The question was auto-closed by TechRepublic

Collapse -

Program Running Check

by bfishell In reply to Program Running Check

This question was auto closed due to inactivity

Back to Web Development Forum
8 total posts (Page 1 of 1)  

Related Discussions

Related Forums