How to change the file version for the uninstaller.exe file ( Inno Setup )

70 views
Skip to first unread message

Dineshwar M

unread,
Oct 30, 2024, 3:15:07 AMOct 30
to innosetup
How to change the uninstaller file version as per our needs. 

Let's say, for example:

I have a file version of 1.0.0.2 for main.exe, and it was configured internally in the code.

For the uninstaller.exe:

The current file version for uninstaller.exe is 51.1052.0.0.

The expected file version for uninstaller.exe is to match with AppVersion=v{#appVersion}.

Could anyone please guide me on how to set the uninstaller.exe version automatically according to AppVersion=v{#appVersion} in the Inno Setup script?

If automatically picking the appVersion is not possible, please suggest hardcoding the fileVersion for the uninstaller.exe

Thank you very much in advance for any advice or solutions you can provide. I genuinely appreciate your time and help!



Bill Stewart

unread,
Oct 30, 2024, 11:34:50 AMOct 30
to innosetup
On Wednesday, October 30, 2024 at 1:15:07 AM UTC-6 Dineshwar M wrote:

How to change the uninstaller file version as per our needs.

Why do you need to change the file version of the uninstaller executable?

TonHu

unread,
Oct 30, 2024, 3:17:38 PMOct 30
to inno...@googlegroups.com
The uninstaller has its own, independent, version number, not related to your application, as it's not part of your application.
The uninstaller is part of the stuff you use to install and uninstall your application with, but that's a different territory.

If some app validation tool is complaining about that, then tell them to get their act straight, or just exclude it from validation.

Op wo 30 okt 2024 om 08:15 schreef Dineshwar M <dineshwar...@gmail.com>:
--
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/27908636-ad80-46a7-934f-9dab3eddfeadn%40googlegroups.com.

Jordan Russell

unread,
Oct 30, 2024, 4:50:31 PMOct 30
to inno...@googlegroups.com
On 10/30/24 2:15 AM, Dineshwar M wrote:
> Let's say, for example:
>
> I have a file version of 1.0.0.2 for main.exe, and it was configured
> internally in the code.
>
> For the uninstaller.exe:
>
> The current file version for uninstaller.exe is 51.1052.0.0.
>
> The expected file version for uninstaller.exe is to match with
> AppVersion=v{#appVersion}.

The uninstaller EXE's version number is used internally, and should
never be changed.

Specifically, Setup checks it when determining whether an existing
uninstaller EXE can/should be replaced. If a 51.x EXE already exists on
the user's system from a previous install, and you were to lower the
version number to 1.x in a new install, the existing EXE would never be
replaced because 1.x is considered older than 51.x. This will lead to an
error message when the user runs the uninstaller, due to the EXE and DAT
versions being out of sync.

-JR

Reply all
Reply to author
Forward
0 new messages