-2

How do I set the name of my program's process, so in task manager instead of seeing "Program.exe(32 bit)" it just shows the name like "Name (32 bit)".Such as it not having the .exe at the end.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
  • 1
    https://stackoverflow.com/questions/23783985/set-child-process-name-in-windows – stark Dec 06 '17 at 22:45
  • Why do you think you want to do that? –  Dec 06 '17 at 22:47
  • 1
    Possible duplicate of [Set child process name in Windows?](https://stackoverflow.com/questions/23783985/set-child-process-name-in-windows) – darksky Dec 06 '17 at 22:56
  • Trying to set the main process name, not the child process names. – Dwarf Killer Dec 06 '17 at 23:09
  • 1
    the task manager show file description of exe file if it exist. if not exist - show exe file name. so you can set "Name" in `"FileDescription"` (the 32bit auto added to wow64 processes) – RbMm Dec 06 '17 at 23:21
  • Your question is based on the false premise, that processes had names. This is not the case, making the question somewhat useless. At any rate, this *is* a duplicate. Had you taken the time to actually read through the answers, you'd understand that it applies to *"main processes"* (whatever that is supposed to be) just as well. Besides, if you fire up Process Explorer you'll see, that (with the exception of a few system processes), all processes are in fact child processes, so what you believe to be a *"main process"* is a child process after all. – IInspectable Dec 07 '17 at 09:43

1 Answers1

4

Processes in Windows have no "name" property, which can be set or read.

Different utilities, like Task Manager, can show you the name of the EXE file which created the process, as well as the FileDescription from the EXE's VERSIONINFO resource (if it exists), the process's command line, etc.

However, you have no control over how such utilities decide to display your process. Currently, Task Manager tries to show the FileDescription from the EXE's version resource, and if it does not exist then shows the name of EXE file instead.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
RbMm
  • 31,280
  • 3
  • 35
  • 56