9

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.

Sameh Sharaf
  • 1,103
  • 1
  • 13
  • 15

3 Answers3

2

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.

Kumar
  • 3,782
  • 4
  • 39
  • 87
0

You can't change the name of the process. If you need to distinguish between the processes then I would suggest you use their process ID rather than their name.

Bali C
  • 30,582
  • 35
  • 123
  • 152
-5

DOS has a wonderful command called title - would seem to fit

@echo off
title MyBatchTitle
...
  • 9
    That changes the MS-DOS command windows title but it doesn't change the process name like the question asked. – Ren Mar 12 '13 at 11:46