use strict; use warnings; use Win32::PEFile; my $filename = 'c:/windows/notepad.exe'; my $pe = Win32::PEFile->new (-file => $filename); my $strings = $pe->getVersionStrings (); printf "%-20s %s\n", $_, $strings->{$_} for sort keys %$strings; my $values = $pe->getFixedVersionValues(); printf "%-20s 0x%08x\n", $_, $values->{$_} for sort keys %$values; #### CompanyName Microsoft Corporation FileDescription Notepad FileVersion 5.1.2600.5512 (xpsp.080413-2105) InternalName Notepad LegalCopyright © Microsoft Corporation. All rights reserved. OriginalFilename NOTEPAD.EXE ProductName Microsoft® Windows® Operating System ProductVersion 5.1.2600.5512 dwFileDateLS 0x00000000 dwFileDateMS 0x00000000 dwFileFlags 0x00000000 dwFileFlagsMask 0x0000003f dwFileOS 0x00040004 dwFileSubtype 0x00000000 dwFileType 0x00000001 dwFileVersionLS 0x0a281588 dwFileVersionMS 0x00050001 dwProductVersionLS 0x0a281588 dwProductVersionMS 0x00050001 dwSignature 0xfeef04bd dwStrucVersion 0x00010000