2

How can I start a program via batch and change its name in the Task Manager. For example,

start "program" /HIGH "%~dp0\program.bin"

In the Task Manager it shows program.bin, but can I change it to something else, for example, hideMe.bin?

2 Answers 2

0

The process name in Task Manager is the name of the executable file ("image name"). So, to change that you will need to rename the file.

5
  • Yes, but I cannot rename the file name because it is set to execute with that name, so if I change it, it will not run. Oct 25, 2015 at 20:59
  • @JamesNotch you ever figure this out? Dec 7, 2017 at 13:22
  • @DavidBrierton do you have that problem?
    – barlop
    Mar 17, 2018 at 2:24
  • @JamesNotch how about copying the exe file so it has the new name and executing that? Or so this idea. So you currently have your exe with the name you can't change.. say it's called blah.exe copy blah.exe blah2.exe then del blah.exe Then make your own blah.exe that calls blah2.exe And if you say oh but that will make blah.exe and blah2.exe in task manager, well if you don't want that you can have your blah.exe start blah2.exe in such a way that it starts it as its own independent thread.. And so blah.exe can terminate as soon as it spawns blah2.exe
    – barlop
    Mar 17, 2018 at 2:24
  • You should know one programming language that can compile EXE files and just find out how to do it in that. By do it in that I mean just executing an executable.
    – barlop
    Mar 17, 2018 at 2:28
0

It sounds like you have a hard-coded path to some executable "program.bin" and you want it to be launched as expected, but appear in Task Manager as "hideme.bin". Is that correct? If so, here's the easiest way to do that (assuming you're using Windows Vista or later):

  1. While the program is not running, rename the execuable to "hideme.bin" (requires write permission on the directory, of course).
  2. Using cmd, run the following command (replacing file names and adding paths as appropriate) to create a symbolic link from the old name to the new one: mklink program.bin hideme.bin (may require administrator privileges).
  3. Run the program/file that launches "program.bin" as normal; it will follow the link such that the program that actually launches will be called "hideme.bin" instead according to the OS (although anybody looking at the command line rather than the image name will see the old name there).

This probably also works using a hard link (add a /H to the command before the file names, as in mklink /H ... as I believe Windows considers the oldest name linking to the file to be the canonical name. Hard links are available even on very old versions (Windows 2000, maybe earlier) via the fsutil command. Both symbolic and hard links require the NTFS file system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.