in reply to Re^2: 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

$processObj->Kill(0); is not working for me to close the created process object, can anyone help me on this. thanks, Sarath S

  • Comment on Re^3: How to close command prompts opened with perl script after execution that script

Replies are listed 'Best First'.
Re^4: How to close command prompts opened with perl script after execution that script
by saraths (Initiate) on Jun 18, 2013 at 12:06 UTC
    my $cmd = "adb shell cat /proc/kmsg | tee kernel_logs.txt"; print $cmd; my $processObj; Win32::Process::Create( $processObj, "C:/windows/system32/cmd.exe", "cmd.exe /k $cmd", 0, NORMAL_PRIORITY_CLASS | CREATE_NEW_CONSOLE, "." )|| die ErrorReport(); sleep(3); $processObj->Kill(0); this was my code, but after sleep processObj is not getting killed.