Change process name when launched as batch file

14,845

You can run batch file as windows service to make a process name. You can set what to happen on start and on stop. You can kill the service using its PID.

C# Tutorial to create batch file as windows service.

Share:
14,845
Sameh Sharaf
Author by

Sameh Sharaf

Updated on June 17, 2022

Comments

  • Sameh Sharaf
    Sameh Sharaf almost 2 years

    I'm working on a monitoring system called "Nagios" which monitors services for UNIX and WINDOWS servers. Problem is WINDOWS services that are launched by batch files are named in task manager as "cmd.exe", so system can't distinguish between these services when monitoring.

    How can I change a process name on task manager when launching it so each one has a unique name rather than "cmd.exe"?

    Thank you in advance.

  • Ren
    Ren about 11 years
    That changes the MS-DOS command windows title but it doesn't change the process name like the question asked.