Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
502 B

  1. use OLE;
  2. use Win32;
  3. $locator = CreateObject OLE 'WbemScripting.SWbemLocator';
  4. $services = $locator->ConnectServer();
  5. $enumerator = $services->InstancesOf("Win32_process");
  6. use Win32::OLE::Enum;
  7. $processes = Win32::OLE::Enum->new ($enumerator);
  8. while ($process = $processes->Next()) {
  9. print "Process: $process->{Name}\n";
  10. $derivation = $process->{Derivation_};
  11. $len = @$derivation;
  12. print "The length of array: $len\n";
  13. foreach $x (@$derivation) {
  14. print "$x\n";
  15. }
  16. }