Re: AdminMisc::GetFileInfo gives different info than
Windows explorer
by Sisyphus other posts by this author
Sep 30 2004 12:30AM messages near this date
view in the new Beta List Site
RE: AdminMisc::GetFileInfo gives different info than Windows
explorer
|
RE: Perl OO
> -----Original Message-----
> From: perl-win32-users-bounces@[...].com
> [mailto:perl-win32-users-bounces@[...].com] On Behalf Of
> Ben Conrad
> Sent: Wednesday, September 29, 2004 11:18 AM
> To: perl-win32-users
> Subject: AdminMisc::GetFileInfo gives different info than Windows
> explorer
>
>
> Folks,
>
> I'm writing a script to find gdiplus.dll files that may be vulnerable to
> the
> microsoft GDI+ bug.
>
> When I use:
>
> Win32::AdminMisc::GetFileInfo($filename, \%Info);
> print "- $Info{ProductVersion}\n";
> -or-
> print "- $Info{FileVersion}\n";
>
> I get version 5.1.3102.2180
>
> But if I look at the file properties in Windows Explorer or use
> filever.exe
> I get 5.1.3097.0
>
Seems odd. I would expect that both approaches use the very same Windows
API function. Are you sure you're looking at the same file ?
> There are notes in the AdminMisc README that say something about a
> subhash
> with a keyname of "File", but I'm not sure how to implement that.
>
>
> Added support for GetFileInfo() to return:
> - Hash will have a subhash with the keyname of "File":
> - File Version (true value as reported by the
> FileVersion
> stamp)
> - Product Version (true value as reported by the
> ProductVersion stamp)
>
Suggests to me that your %Info should have a key named 'File'. Is that
the case ? If so you just have to get the values of the keys of the
subhash (a hash reference, presumably) at $Info{'File'}.
my %deref = %{$Info{'File'}};
for $k(keys %deref) {print $k, " : ", $deref{$k}, "\n"}
Hth.
Cheers,
Rob
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Steven Manross
Sisyphus
|