viewpoint-particle

Author Topic: FileVerInfo resource-string for "Vendor" information - or alternative solution?  (Read 102 times)

Mol

  • Newbie
  • *
  • Posts: 1
I am looking for a way to get the file information of an exe/dll file stored under "Vendor" as the current version of FileVerInfo does not offer this resource-string by default. - Or am I wrong?

eg: explorer.exe
       Vendor: Microsoft Windows
       Company Name: Microsoft Corporation

Thanks for any help.

ChuckC

  • Full Member
  • ***
  • Posts: 178
The "Company Name" field from the FileVerInfo is also accessible as the "System.Company" property for a PE [Portable Executable] formatted file [e.g. an EXE or DLL file].

Take a look at the Property Store Utility extender:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WIL~Extenders/_Third~Party~Extenders/Property~Store~Utility+Property~Store~Extender.txt

It is downloadable via this link:

http://techsupt.winbatch.com/techsupt/WWPSU45001.zip


In the extender's help file is a sample script called the Property Store Explorer [PSExplorer.wbt].  Copy the sample script code from the help file and save it as a .WBT file on disk.  Then execute it with WinBatch or run it from the WinBatch Studio.  Click on the "Open File" button, browse to the .EXE or .DLL file you want to get vendor information from, and select it.  Then scroll down the list of property names until you find "System.Company" and click on that property name.  The corresponding property value will be displayed.

Everything that is being done in the script using the extender to extract property names & values from a file is all stuff that you can do in your own script.  PSExplorer.wbt simply servers as a means of demonstrating the extender's capabilities so that you can get a good idea of the property information it can read/write for any given file type before you get down to writing some purpose-specific code to use the extender.

Post back here if you have any additional questions.

As for the "Vendor" resource, that isn't part of the FileVerInfo data structure, per Microsoft's documentation, and there isn't a corresponding property name for it in the property store.

For reference:

https://docs.microsoft.com/en-us/windows/desktop/menurc/stringfileinfo-block


At a guess, it's a custom resource being compiled into the binary and there's no built-in mechanism for any of the standard version information / property store methodologies to obtain it.  I would expect that some sort of resource dump / de-compiler tool would be needed for that.  If you are particularly masochistic, you can always read the PE specifications and do all the calculations yourself to find embedded resources in a program file.