Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
I need to track my process status. But if many EXE of same name exists I cant differentiate. The only way to differentiate this is using process Id.

But this doesn't work well for my problem.

So my requirement is that I need to create my own EXE depending on Id.

If my common EXE was bantd.exe. I need to add my Id next to that process name.

Example bantd123.exe, bantd3455.exe.

Is there any way to do this
Posted
Comments
Sergey Alexandrovich Kryukov 31-Jul-14 3:01am    
The whole idea makes no sense at all. Can you tell us your ultimate goal?
—SA
KUMAR619 31-Jul-14 3:04am    
Sir, Let me explain this briefly.
I am in Medical based project. Where there are two EXE files.

One EXE is static which exists only once.
But the second one Order.EXE is not static i.e.. when we click on a patient
a Order.EXE window opens separately. But I was asked to open Multiple patients of different Id
but If I open the same patient which is already opened Its should not open.

Since every patient's details gets open on Order.Exe then how to differentiate them and I need to eliminate the process which is already opened.

Is there any way to solve this Sir. Is is possible Sir.

1 solution

You can't specify a process id when you start a process - it is assigned by the system, not your app.

But when you start an EXE running from within your application, you do so using the Process class. And the Process class gives you the Process Id of the running application via the Id Property[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900