Feature suggestion: Get named strings from executable version info

84 views
Skip to first unread message

Bill Stewart

unread,
Jul 16, 2026, 5:09:04 PMJul 16
to innosetup
It would be useful to have a support function to get version information strings (Comments, CompanyName, FileDescription, FileVersion, etc.) from a version resource in an executable.

This can be useful in cases where (e.g.) the FileVersion (or ProductVersion) string is different (and more authoritative) than the file version (or product version) in the file's VS_FIXEDFILEINFO structure. For example: python.exe 3.14.6 has a VS_FIXEDFILEINFO structure that says the file is version 3.14.6150.1013, but the FileVersion string is "3.14.6" (which is actually what we want).

Gavin Lambert

unread,
Jul 17, 2026, 3:19:33 AMJul 17
to innosetup
On Friday, July 17, 2026 at 9:09:04 AM UTC+12 Bill Stewart wrote:
It would be useful to have a support function to get version information strings (Comments, CompanyName, FileDescription, FileVersion, etc.) from a version resource in an executable.

This can be useful in cases where (e.g.) the FileVersion (or ProductVersion) string is different (and more authoritative) than the file version (or product version) in the file's VS_FIXEDFILEINFO structure. For example: python.exe 3.14.6 has a VS_FIXEDFILEINFO structure that says the file is version 3.14.6150.1013, but the FileVersion string is "3.14.6" (which is actually what we want).

Provided that it's a [Files] entry you're looking at (and not something on the user's machine), you can use ISPP's GetStringFileInfo for this (or one of the related helper functions from ISPPBuiltins).

AFAIK this functionality is not currently available for files on the user's machine, although with effort you can use the WinAPI or a helper DLL to do this.

Bill Stewart

unread,
Jul 17, 2026, 9:19:57 AMJul 17
to innosetup
On Friday, July 17, 2026 at 1:19:33 AM UTC-6 Gavin Lambert wrote:

AFAIK this functionality is not currently available for files on the user's machine...

Correct; it's not available currently (hence the feature request).

Bill Stewart

unread,
Jul 17, 2026, 4:12:56 PMJul 17
to innosetup
On Friday, July 17, 2026 at 1:19:33 AM UTC-6 Gavin Lambert wrote:

...although with effort you can use the WinAPI or a helper DLL to do this.

Yes.

For anyone that needs this until it becomes a feature:


The HOWTO-InnoSetup document and the example TestVerInfoString.iss file explain how to use the dll.

Martijn Laan - Inno Setup

unread,
Jul 18, 2026, 1:20:20 AMJul 18
to innosetup
Hi,

Yeah, that's a good idea, I don't like such as mismatch between ISPP and [Code].

What are you going to use the information for? You didn't explain that part.

Also wondering if a {ver:...} constant would make sense. The functionality you're asking for doesn't seem like something that would necessarily be [Code] only.

Greetings,
Martijn

Op 16-7-2026 om 23:09 schreef 'Bill Stewart' via innosetup:
It would be useful to have a support function to get version information strings (Comments, CompanyName, FileDescription, FileVersion, etc.) from a version resource in an executable.

This can be useful in cases where (e.g.) the FileVersion (or ProductVersion) string is different (and more authoritative) than the file version (or product version) in the file's VS_FIXEDFILEINFO structure. For example: python.exe 3.14.6 has a VS_FIXEDFILEINFO structure that says the file is version 3.14.6150.1013, but the FileVersion string is "3.14.6" (which is actually what we want).
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/b08cd258-ce48-49a6-95ca-dbb3a48c3cfen%40googlegroups.com.

Bill Stewart

unread,
Jul 18, 2026, 9:05:47 AMJul 18
to innosetup
On Friday, July 17, 2026 at 11:20:20 PM UTC-6 Martijn Laan - Inno Setup wrote:

What are you going to use the information for? You didn't explain that part.

As I wrote previously:

Martijn Laan - Inno Setup

unread,
Jul 18, 2026, 9:24:38 AMJul 18
to innosetup
I meant to ask, why is it useful? Just trying to understand what you need the version number for.

Greetings,
Martijn

-------- Original Message --------
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.

Bill Stewart

unread,
Jul 18, 2026, 5:58:24 PMJul 18
to innosetup
On Saturday, July 18, 2026 at 7:24:38 AM UTC-6 Martijn Laan - Inno Setup wrote:

I meant to ask, why is it useful? Just trying to understand what you need the version number for.

Seeing as the PSF has abandoned a per-machine installer for Python (or rather will be quite soon), I am considering developing one. Getting the official version number of the python.exe file would be useful toward this end.

Reply all
Reply to author
Forward
0 new messages