如何阅读Windows的.exe文件版本?(How to read windows .exe file version?)
我需要从Windows EXE和MSI文件解析文件版本和产品版本。
你能指出我的文件规范或库(最好用Java)吗?
更新:
事实证明,我不能使用winapi,因为代码需要在Linux上运行......
I need to parse the file version and product version from windows exe and msi files.
Could you point me to the file specification or the library (preferably in Java) that does that?
UPDATE:
It turns out I cannot use winapi, as the code needs to run on linux as well...
最满意答案
您可以使用GetFileVersionInfoSize和GetFileVersionInfo函数来获取文件版本和产品版本。 我不是Java的大师,但据我所知,有可能使用WinAPI函数。
You could use GetFileVersionInfoSize and GetFileVersionInfo functions to get file version and product version. I'm not guru in Java but as far as I know there is the possibility to use WinAPI functions.
更多推荐
发布评论