Change the process name at startup as a batch file

I am working on a monitoring system called "Nagios" that monitors services for UNIX and WINDOWS servers. The problem is that the WINDOWS services launched by the batch files are called in the task manager as "cmd.exe", so the system cannot distinguish between these services during monitoring.

How can I change the name of the process in the task manager when it starts so that everyone has a unique name, and not "cmd.exe"?

Thanks in advance.

+6
source share
3 answers

You can run the batch file as a Windows service to create the process name. You can set what happens when starting and stopping. You can kill the service using your PID.

C # tutorial to create a batch file as a Windows service.

+2
source

You cannot change the process name. If you need to distinguish between processes, I would suggest that you use their process identifier, rather than its name.

0
source

DOS has a wonderful command called title - it seems to fit

@echo off title MyBatchTitle ... 
-1
source

All Articles