in reply to Get PID of an excel.exe opened by perl
Sadly, I'm not sure how to find out, which file is opened by a specific instance. That is a bit more difficult, because each instance can open multiple files.use strict; use warnings; use Win32::Process::Info; use Data::Dumper; my $pi = Win32::Process::Info->new(); for ( $pi->ListPids ) { my ($info) = $pi->GetProcInfo ($_); print "Excel instance at PID $_.\n" if $info->{Name} =~ /excel\.ex +e/i; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Get PID of an excel.exe opened by perl
by Nalina (Monk) on Jun 07, 2005 at 06:01 UTC | |
by holli (Abbot) on Jun 07, 2005 at 08:50 UTC |