Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change process name when launched as batch file

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.

like image 380
Sameh Sharaf Avatar asked Nov 20 '12 12:11

Sameh Sharaf


1 Answers

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.

like image 56
Kumar Avatar answered Sep 30 '22 06:09

Kumar