Home All Groups Group Topic Archive Search About

How to check running program existed or not

Author
20 Oct 2005 1:59 AM
Masriaty
Hi Everyone,

I have a VB program that automatically running (in minimize), let us call it
DataLog.exe when I open my main program. DataLog.exe will to the data logging
function and store it in database (Access).

My problem is, every day this DataLog.exe is shutdown by unknown causes.

Is there anyone know how to check whether DataLog.exe still running (appears
in Task Manager) and also prevent user from kill the DataLog.exe from Task
Manager?

Thanks in advance.

Author
20 Oct 2005 7:13 AM
Robert
Does this application have a visible form? Hide it if you don't want just
anyone to close it.

You could also check the UnloadMode parameter in the QueryUnload event of
the form. It tells you why the application should close. You could write
this parameter to a log file, so if the application has been closed, you
know whether the user closed it, whether it was closed from the task
manager, etc. And if you don't have a logfile at all, it probably crashed
somewhere.

Robert

Show quote
"Masriaty" <Masri***@discussions.microsoft.com> wrote in message
news:741C8C74-83E8-48D0-AAA2-63DF70306F17@microsoft.com...
> Hi Everyone,
>
> I have a VB program that automatically running (in minimize), let us call
it
> DataLog.exe when I open my main program. DataLog.exe will to the data
logging
> function and store it in database (Access).
>
> My problem is, every day this DataLog.exe is shutdown by unknown causes.
>
> Is there anyone know how to check whether DataLog.exe still running
(appears
> in Task Manager) and also prevent user from kill the DataLog.exe from Task
> Manager?
>
> Thanks in advance.
Author
26 Oct 2005 6:55 AM
Masriaty
Hi Robert,

In Form Unload, we did put a log file when user mannually close the screen.
However when user kills the program through task manager, the logfile
remains the same - not effected by the action.

The only thing we did not put the same function when error occurs.

What our plan here is, when user want to kill the program from task manager,
system (OS) will alert that user unable to delete it and program continues to
run.

-Masriaty-



Show quote
"Robert" wrote:

> Does this application have a visible form? Hide it if you don't want just
> anyone to close it.
>
> You could also check the UnloadMode parameter in the QueryUnload event of
> the form. It tells you why the application should close. You could write
> this parameter to a log file, so if the application has been closed, you
> know whether the user closed it, whether it was closed from the task
> manager, etc. And if you don't have a logfile at all, it probably crashed
> somewhere.
>
> Robert

AddThis Social Bookmark Button