Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileVersion and ProductVersion returning the same values #55

Open
GoogleCodeExporter opened this issue Mar 31, 2015 · 1 comment
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Download an EXE where the file version is different from the product 
version. (I'm using CurrPorts, as provided by NirSoft.)
2. Run the script to retrieve FileVersion and ProductVersion information.

What is the expected output?

FileVersion: 2.1.0.0
ProductVersion: 2.10

What do you see instead?

FileVersion: 2.10
ProductVersion: 2.10

What version of the product are you using? On what operating system?

Python: 2.7.5
Version: 1.2.10-139
OS: Windows 7 64-bit

Please provide any additional information below.

The code:

import pefile

pe = pefile.PE(r"C:\Path\To\File\cports.exe")
print pe.FileInfo[0].StringTable[0].entries['FileVersion']
print pe.FileInfo[0].StringTable[0].entries['ProductVersion']

Original issue reported on code.google.com by [email protected] on 5 Nov 2014 at 11:16

Attachments:

@GoogleCodeExporter
Copy link
Author

Meanwhile, I follow the code here, and I get both file and product returning 
the file info and NOT the product info:

http://stackoverflow.com/questions/1264472/using-the-pefile-py-to-get-file-exe-v
ersion

So I suppose between the two, I'll get the correct info?

Original comment by [email protected] on 5 Nov 2014 at 11:23

  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant