[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-win32-admin
Subject: Re: file version help
From: "David 'Sniper' Rigaudiere" <sniper () nerim ! net>
Date: 2003-08-13 20:02:28
[Download RAW message or body]
Jonathan Chan <jonchan@drimple.net>
> hey guys,
>
> i'm using Win32::AdminMisc::GetFileInfo to retreive the file version
> what i need is the file version that is listed at the top of the
> window above "description".
> any ideas?
One way :
=== GetFileVersion.pl ===
use strict;
use Win32::OLE;
my $file = $ARGV[0];
die "$file does not exists\n" if not -e $file;
my $fso = Win32::OLE->new('Scripting.FileSystemObject');
my $version = $fso->GetFileVersion($file);
print "$file => $version\n";
==========================
D:\>GetFileVersion.pl c:\windows\notepad.exe
c:\windows\notepad.exe => 5.1.2600.0
David "Sniper" Rigaudiere
core member of Paris Perl Mongers
_______________________________________________
Perl-Win32-Admin mailing list
Perl-Win32-Admin@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic