Change processname

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

Is there a way to change the processname of an application at runtime?

Thanks in Advance!
 
Is there a way to change the processname of an application at runtime?

No. Why?


Mattias
 
We have applications that run as multiple instances and do different thing
based on settings in the app.config file So we could have the same up that
is a copy of the original but has different config file values.. I would
like these processes to show up in list in the task manager based on the
config file settings.
 
Hi Rick,

I have spent some some researching on a way to change the process name of
an application at runtime, but without luck.

The Pocess.ProcessName property holds an executable file name, such as
Outlook, that does not include the .exe extension or the path and this is a
readonly property which means we couldn't change it at runtime.

In your scenario, what you want is to show the processes up in the Task
Manager based on their the config file settings.

I suggest that you display the text on the title bar of main form according
to the application's own config file setting. Different processes with
different config settings will have different title bar text, so we can
differentiate these processes in the Applications tab in the Task Manager.

Hope this helps.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Thanks, but we're already showing the title on the main form based on the
config file.
The users accessing the machines can log into 3 different sessions with
different apps running under different sessions. And they want to be able to
stop the processes through the task manager, without having to log onto each
individal session to find the application to kill.
 
Hi Rick,

Thank you for your response.
The users accessing the machines can log into 3 different sessions with
different apps running under different sessions

Based on my understanding, the application has some copies on the machine
and each copy is stored in a per-user path on the machine. When a user logs
into the machine, he runs the applicaion copy from his own per-user patch.
If I have any misunderstanding, please feel free to let me know.

Since the application has many copies, why not change the application
copy's name to identify it? For example, for the application copy for User
A, the name is MyAppForA.exe. And the name of the application for User B is
MyAppForB.exe.

If my suggestion is not appropriate to your scenario, please feel free to
let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support
 
Hi Rick,

How about the problem now?

If you need our further assistance, please feel free to let me know.

Thank you for using our MSDN Managed Newsgroup Support Service!

Sincerely,
Linda Liu
Microsoft Online Community Support
 
Back
Top