Results 1 to 7 of 7

Thread: VB.NET Application Process Name in Task Manager

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2014
    Posts
    7

    VB.NET Application Process Name in Task Manager

    Hi,

    I have an app that launches multiple instances of another executable. Each instance of that executable processes a separate case. I would like to change the process name that shows in Task Manager to show which case each instance of that executable is working on. Is there a way in VB.net to change the process name at run-time?

    Thanks.

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,525

  3. #3
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: VB.NET Application Process Name in Task Manager

    Quote Originally Posted by TommyVIO View Post
    Hi,

    I have an app that launches multiple instances of another executable. Each instance of that executable processes a separate case. I would like to change the process name that shows in Task Manager to show which case each instance of that executable is working on. Is there a way in VB.net to change the process name at run-time?

    Thanks.
    Why not use the program that launched??? the executables as a monitor? Show the code that does the launching. Please.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2014
    Posts
    7

    Re: VB.NET Application Process Name in Task Manager

    Quote Originally Posted by dbasnett View Post
    Why not use the program that launched??? the executables as a monitor? Show the code that does the launching. Please.
    Hi, thanks for replying.

    The main app that launches these already monitors the processes. However, it would still help a lot to identify the specific processes in case i'd like to End Task to a specific one.

    It's kind of frustrating that something so simple wouldn't be available in VB.net. I guess there's a reason why this can't be done, but there's still a way to do it using API, it's just complicated.

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2014
    Posts
    7

    Re: VB.NET Application Process Name in Task Manager

    Since I am realizing that there's no way to change the process name that shows in Task Manager, I came up with a different idea...

    Many apps that allow to open files (such as Notepad) show up in the Task Manager as "Filename.txt - Notepad". So maybe I can use this method to differentiate the multiple instances of the exe that i'm running.

    Anyone know how to do that?

    Thanks in advance.

  6. #6
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: VB.NET Application Process Name in Task Manager

    Quote Originally Posted by TommyVIO View Post
    Hi, thanks for replying.

    The main app that launches these already monitors the processes. However, it would still help a lot to identify the specific processes in case i'd like to End Task to a specific one.

    It's kind of frustrating that something so simple wouldn't be available in VB.net. I guess there's a reason why this can't be done, but there's still a way to do it using API, it's just complicated.
    Since you didn't show code I'll guess that you are using Process.Start and storing the Process. Each process has an ID. Using Resource Monitor you can see each process and it's ID.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  7. #7

    Thread Starter
    New Member
    Join Date
    Nov 2014
    Posts
    7

    Re: VB.NET Application Process Name in Task Manager

    Quote Originally Posted by dbasnett View Post
    Since you didn't show code I'll guess that you are using Process.Start and storing the Process. Each process has an ID. Using Resource Monitor you can see each process and it's ID.
    Actually, I converted this APP from VB6 to VB.net recently and it was using the "Shell()" to launch the EXEs, so I just left it like that. However, you just gave me a great idea. I will modify my code to use the process.start to have the process ID of each one of them. And this way I can also kill any of them directly through the main app.

    This way, I won't need the Task Manager at all.

    Thank you for trying!
    Last edited by TommyVIO; Feb 1st, 2024 at 10:52 AM. Reason: Corrected mistake.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width