473,466 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

On Linux: Get Windows file version.

I'm looking for information on getting the Version of a Windows
Executable (or DLL) *after* the file has been copied to a Linux system.
This probably means I will need to recreate GetFileVersionInfoSize,
GetFileVersionInfo and VerQueryValue. Does anyone have any ideas on
where I can find those either as libraries or the source for them? The
languages I have available for this are C, Perl and shell scripts.

(This is for a commerical vulnerability scanner that runs on Linux and
can copy files over from the Windows box it is scanning using SSH.)

Thank You
Randolph Finder
Saint Corporation

Apr 25 '06 #1
2 5519
Hi Randolph,

Naraht wrote:
I'm looking for information on getting the Version of a Windows
Executable (or DLL) *after* the file has been copied to a Linux
system.
This probably means I will need to recreate GetFileVersionInfoSize,
GetFileVersionInfo and VerQueryValue. Does anyone have any ideas on
where I can find those either as libraries or the source for them? The
languages I have available for this are C, Perl and shell scripts.

You may want to checkout the wine project for information on this.
On Windows these functions are located in the version.dll. I checked the
wine project is it has a version.dll.so. You may want to start there.

Hope this helps

Mothra
Apr 25 '06 #2
Naraht wrote:
I'm looking for information on getting the Version of a Windows
Executable (or DLL) *after* the file has been copied to a Linux system.
This probably means I will need to recreate GetFileVersionInfoSize,
GetFileVersionInfo and VerQueryValue. Does anyone have any ideas on
where I can find those either as libraries or the source for them? The
languages I have available for this are C, Perl and shell scripts.

(This is for a commerical vulnerability scanner that runs on Linux and
can copy files over from the Windows box it is scanning using SSH.)

Thank You
Randolph Finder
Saint Corporation


I was going to suggest running Win32::File::VersionInfo under Wine, but
then I stumbled across Win32::Exe, which as far as I can tell uses a
hand-rolled parser for MZ/PE headers, including common resource types.
Very cool! The documentation is a little sparse, but what little there
is has this as example code:

use Win32::Exe;
my $exe = Win32::Exe->new('c:/windows/notepad.exe');

# Get version information
print $exe->version_info->get('FileDescription'), ": ",
$exe->version_info->get('LegalCopyright'), "\n";

--
Donald King, a.k.a. Chronos Tachyon
http://chronos-tachyon.net/
Apr 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: kenton | last post by:
Does anyone know if Oracle forgot to put the OEM tools in the 9.2.0.4 Linux x86-64 version of their download? I have installed both the database and the client tools and cannot find the emca tool...
0
by: Kurt Ng | last post by:
Hi, y'all. I am working on retrieving file version info on a third party dll. I have used the FileVersionInfo class to retrieve all of the standard version information already such as...
1
by: Microsoft | last post by:
I need to extract the file version from a file. I'll paste the code below. The problem is that VB returns a value that looks liks this "5.00.2195.6824" and windows returns a value that looks like...
5
by: Lurc | last post by:
Dear all, Is there any way which can let me tell the version of each MDB file? As you know when Access loading an old version MDB file, it will automatically prompt user if they want to...
2
by: muttu2244 | last post by:
hi all could anybody please tell me how can i copy a file from windows file systems like FAT12, FAT16,FAT32 and NTFS to EXT2, and EXT3. Is their any function in python that we can do the above ...
2
by: opswat | last post by:
Hello, I am currently working on a C++ project for a PocketPC with Windows Mobile 5.0 in Visual Studio 2005. I am currently looking for a way to get file version information, i.e. file...
6
by: Zytan | last post by:
In the Assembly Information, you can set the assembly version and the file version. What is the difference between the two? The documentation is not exactly helpful in this area. I had the...
0
by: sudhansukanungo | last post by:
Hi All actually im new to linux. im writting some codes to display the exe file version. can any body help me by saying what is the system call we r using in linux to get file versio. Thank you...
6
JustRun
by: JustRun | last post by:
I have two windows application projects in the same solution, The solution contains an application that has a reference to another application in the same solution, When I tried to publish the...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.