如何阅读Windows的.exe文件版本?(How to read windows .exe file version?)

编程入门 行业动态 更新时间:2024-10-13 02:14:04
如何阅读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.

更多推荐

本文发布于:2023-08-08 00:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1466637.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:版本   文件   exe   Windows   version

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!