Click to See Complete Forum and Search --> : CreateProcess question


c357323
May 30th, 2004, 07:57 AM
Hi all,

I used CreateProcess function to call a windows executable. But when I check Processes under Task Manager I see the filename.ext displayed as the Image Name.

Is there a way to change this Image Name into a more informative one.

Thank you

NoHero
May 30th, 2004, 10:25 AM
No, a process is always named after the first module that it runs.

Rename the image name, before calling CreateProcess?

Andreas Masur
May 31st, 2004, 06:03 AM
Originally posted by c357323
Is there a way to change this Image Name into a more informative one.

Why?

c357323
May 31st, 2004, 06:20 AM
Here is the situation in details:

I have this executable that I want to call internally from my program through CreateProcess().
I want to hide it from the user and make him unable to run it directly so I changed it from .exe into another extension.
But as I mentioned previously, this new filename.ext is displayed as the Image Name in Task Manager, and this will reveal to the user that it is an executable file and thus it is no longer hidden.

This is the reason why I want it changed.

Andreas Masur
May 31st, 2004, 07:11 AM
Well...the process name will always we displayed unless you run your application as a service. So, even if you rename the displayed name, it will still be showed in the 'Process' tab of the task manager, and thus, the user still can see that it is an executable...

c357323
May 31st, 2004, 07:44 AM
Originally posted by Andreas Masur
So, even if you rename the displayed name, it will still be showed in the 'Process' tab of the task manager

If I renamed the displayed name, the user would not know which is the original file executed. So I don't have a big problem with Task Manager displaying the modified name, the problem exists if I can't change it at all.


P.S. If anyone suggests using a function other than CreateProcess that would do the trick please do it.

NoHero
May 31st, 2004, 01:18 PM
got my personal message? This should be the correct answer to your question ...

Regards