Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Windows there is a version information page in an executable/library file properties window. How to view that info in Ubuntu?

share|improve this question
2  
Do you mean how to view such information from Linux binaries/libraries or windows EXE/DLL using a Linux utility ? – João Pinto Jan 26 '11 at 23:30
1  
As I've clearly specified in the question title, I mean PE (Windows) EXE and DLL files (to view using a Linux utility of course). – Ivan Jan 27 '11 at 6:27
up vote 0 down vote accepted

You probably need to install a third-party PE file viewer, such as http://www.ucware.com/apev/index.htm

share|improve this answer
    
Isn't there a Linux native tool for this? – Ivan Jan 27 '11 at 6:28
    
3  
$25 for a file information viewer? Seriously? – Mechanical snail Jan 10 '13 at 21:17
1  
Note for visitors after April 5, 2013: This software appears to have been discontinued, and is no longer available from the developer. – Moshe Katz Oct 21 '13 at 15:27

I'm working in a tool called pev to retrieve information about PE files on the command line.

The file version can be fetched with the -p option:

pev -p program.exe

pev is available on Ubuntu in the pev package.

share|improve this answer
2  
@Ivan you might consider accepting this answer instead. – Russell Silva Oct 25 '13 at 16:39

From the gnome-exe-thumbnailer script, suggested by Scott Ritchie:

wrestool --extract --raw --type=version inputfile.exe

extracts the version information, printing some binary data mixed with UTF-16 text. The script converts it to readable text by piping it through:

tr '\0, ' '\t.\0' \
| sed 's/\t\t/_/g' \
| tr -c -d '[:print:]' \
| sed -r -n 's/.*Version[^0-9]*([0-9]+\.[0-9]+(\.[0-9][0-9]?)?).*/\1/p'

The overall command is then wrestool --extract --raw --type=version inputfile.exe | tr '\0, ' '\t.\0' | sed 's/\t\t/_/g' | tr -c -d '[:print:]' | sed -r -n 's/.*Version[^0-9]*([0-9]+\.[0-9]+(\.[0-9][0-9]?)?).*/\1/p'.

share|improve this answer
    
+1 wrestool is provided by the icoutil package which is available as a standard Debian package since way back. – tripleee May 9 '14 at 7:52
    
you may make it simpler by just pipe it through | hexdump -C – Tomofumi Jan 30 '15 at 2:28

If you install the gnome-exe-thumbnailer package, you can simply look at the version number in nautilus.

The code to do this manually is available in /usr/bin/gnome-exe-thumbnailer.sh

share|improve this answer
    
@Scott.. Thanks. it works.. the relevant code is very simple to use in another script... I assume that what you mean by "you can simply look at the version number in nautilus", is that that the version number appears grafted into the .exe's icon in Nautilus.. an interesting idea.. Personally, I rarely use the icon-view, but the code snippet is great for me.. – Peter.O Aug 13 '11 at 12:09

As an alternative to using tr and sed to parse the output from @mechanical-snail 's solution, here is a GNU strings and GNU grep version:

$ wrestool --extract --raw --type=version putty.exe | strings -el | grep Version -A 1

FileVersion
Release 0.65
ProductVersion
Release 0.65
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.