Changing the process name at run time (C ++)

Is it possible to change the name (the one that appears in the "processes" section of the task manager) at run time in win32? I want the program to be able to change its own name, and not another program. Help would be appreciated, preferably in C ++. And dispel any thoughts about viruses, no, this is not a virus, yes, I know what I'm doing, this is for my own use.

+3
source share
3 answers

I know that you are asking for Win32, but with most * nixes this can be done simply by changing argv [0]

+1
source

I would like to introduce what, in my opinion, is a good reason for changing the process name at runtime:

exe, - . . . , , . factory 7 , . , 3 3 .

, sched.exe 7 , : Sched- -sub1 -sub2 -sub3 -mach1 -mach2 Sched-Mach3

( ). , , .

+6

I found code for this in VB. I believe that it will not be too difficult to convert it to C ++ code.

A Good Book on Low-Level Content Inside Microsoft Windows .

And I agree with Peter Ruderman

This is not what you should do.

+1
source

Source: https://habr.com/ru/post/1711262/


All Articles