Vishal Khemani Vishal Khemani - 1 year ago 77
Perl Question

How to kill a process using its name in perl script on windows

I am running a perl script which calls a batch file.
This batch file runs an exe( It was created by a console application in Visual Studio earlier).

I want to kill this exe from the perl script later using its name.

Could someone please help.

Answer Source

Use TASKKILL, like this:


You'll need to shell out to do it, but you seem to be doing that already to start it anyway.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download