rdwaters has asked for the wisdom of the Perl Monks concerning the following question:
$Machine = ''; $Machine =~ s{^[\\/]{2,}}{}; my $CLASS = 'WinMgmts:{impersonationLevel=impersonate}!//' . $Machine; my $WMI = Win32::OLE->GetObject($CLASS) or die Win32::OLE->LastError() +; foreach my $proc (in $WMI->InstancesOf('Win32_Process')){ print "$proc->{'Name'}" . " | " . "$proc->{'ProcessId'}\n"; $where = index($searchString, $proc->{'Name'}); if ($where > -1) { UpdateLogFile("$searchString running"); last; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting Windows App Info with Perl
by BrowserUk (Patriarch) on Oct 02, 2003 at 22:01 UTC | |
|
Re: Getting Windows App Info with Perl
by PodMaster (Abbot) on Oct 02, 2003 at 21:10 UTC | |
|
Re: Getting Windows App Info with Perl
by rdwaters (Initiate) on Oct 14, 2003 at 20:37 UTC |