This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
1 Replies Last post: Sep 4, 2007 10:50 PM by Serge Piletsky  
Brian Skaarup   3 posts since
Sep 3, 2007
Currently Being Moderated

Sep 4, 2007 4:25 PM

Getting File version and/or Product version

If I right click on an .exe file in Windows Explorer, select Properties and click the details tab there are several properties (like "File version" and "Product version")

Is there a way to get these file properties with Winpack?

Serge Piletsky TeamDev Ltd. 670 posts since
Apr 24, 2006
Currently Being Moderated
1. Sep 4, 2007 10:50 PM in response to: Brian Skaarup
Re: Getting File version and/or Product version

Hi Brian,

 

Right now in WinPack there is no functionality for obtaining such file properties from EXE files. But there is DllVersionInfo class which allows to get version information from the DLL files that have DllGetVersion function: http://www.teamdev.com/downloads/winpack/javadoc/com/jniwrapper/win32/system/DllVersionInfo.html

 

In the Windows API there are several functions (such as GetFileVersionInfo, GetFileVersionInfoSize and VerQueryValue) that allow to obtain various information from executable files. You can find the detailed information about these function in MSDN or on the following article which provides the detailed information about this API: http://www.microsoft.com/msj/0498/c0498.aspx

 

I think that such feature is really useful so I have created the FileInformation class which is attached. This demonstrates how to use that API using JNIWrapper and WinPack. It also will be available in the next version of WinPack as well.

 

Please let me know if you have any questions.

 

-Serge

Attachments:

More Like This

  • Retrieving data ...