packageinfo.pl

Print information about a package (Perl). Uses the package manager interface to print information about a package.

00001 use Win32::OLE;
00002 use Win32::OLE::Variant;
00003 my $packageManager = Win32::OLE->new('MiKTeX.PackageManager')
00004   or die "MiKTeX is not properly installed.\n";
00005 my $packageInfo = $packageManager->GetPackageInfo("$ARGV[0]");
00006 print "$packageInfo->{'deploymentName'}\n";
00007 print "$packageInfo->{'title'}\n";
00008 if ($packageInfo->{'isInstalled'}) {
00009   my $timeInstalled = Variant(VT_DATE|VT_BYREF,
00010                               $packageInfo->{'timeInstalled'});
00011   print "installed on $timeInstalled\n";
00012 } else {
00013   print "not installed\n";
00014 }

Generated on Fri Dec 14 18:27:43 2007 for MiKTeX by  doxygen 1.5.1-p1