Reputation: 319
I want to read the file properties like File Description
, Product name
, Copyright
of a exe file. Is there any Windows API
for it?
Upvotes: 0
Views: 1593
Reputation: 595329
Those values are stored in the file's version info resource. You can use GetFileVersionInfo()
and VerQueryValue()
to read them.
Upvotes: 2
Reputation: 148870
Yes. It may not be evident to find it because the Version Information chapter is hidden below Menus and other Resources. The rationale for that is that it is stored is the executable files (including DLL) as a VERSIONINFO resource that was originally intented to help install tools to know whether the version to install was more recent than an existing version.
You will find examples for using it in the linked page to the MSDN and also in SO in different places, for example here
Upvotes: 2