Thanks ig. It's working fine. I have small doubt.
I have opened two command prompts as you mentioned above using perl script. Is it possible to run any commands which are not specified in $cmd variable on opened prompts?
I mean to say "First perl script opens a command prompt. Then executes whatever the command in the $cmd varible. Now i want to run one more command on that opened prompt before closing it using $processObj->Kill(0)"
in reply to Re: How to close command prompts opened with perl script after execution that script
in thread How to close command prompts opened with perl script after execution that script