Valhalla Legends Forums Archive | General Programming | Set Process Name

AuthorMessageTime
ioSys
I have made an VB6 application that dont use any forms that is compiled to an .EXE file. I will run more instances of this application at the same time and wants to be able to stop the right one. Normally I cant see wich one is wich in "process explorer". Is it possible for me to set the name of the process when I start my application?

I can see that in the .VBP file there is a part: Title="SendApp" that defines the name of the process.

It would help me a lot if I was able to terminate the right one by being able to see what one is the one to terminate.
SendApp1
SendApp2
SendApp3

Sorry for bad english =)

Thanks in advance
August 9, 2007, 3:17 PM
BreW
I don't think there's absolutely way to tell apart the applications by their image name only (PID will help, though) and I don't think it's modifiable on runtime either.... sorry :/
August 10, 2007, 5:05 AM
ioSys
Thanks for your reply. Anyone else that knows if what I want to do is possible or not?
August 10, 2007, 11:32 AM
rabbit
You could write the app as ProcName____ or whatever and then write a loader that modifies the executable with a UID or something.
August 10, 2007, 11:55 AM
raylu
http://www.microsoft.com/technet/sysinternals/Utilities/ProcessExplorer.mspx
procexp will show you when they were started, along with a ton of other information if you pick Properties from the context menu.
August 10, 2007, 9:16 PM
ioSys
[quote author=rabbit link=topic=16933.msg171482#msg171482 date=1186746925]
You could write the app as ProcName____ or whatever and then write a loader that modifies the executable with a UID or something.
[/quote]

Nice solution, Rabbit. It is not supposed to do it another "cleaner" way via API or such? I try this solution.

Raylu, I try that app. Even though it doesent solve my problem.

Thank you for helping!


Now my little loader is complete and working! =) Thanks for the help!
August 12, 2007, 6:54 AM

Search