I use Inno Setup for my installers. I have a problem with VersionInfo inside unins000.exe
. For filling VersionInfo in installer I used directives AppPublisher
, AppCopyright
and etc. But it doesn't affect setup uninstaller unins000.exe
.
Google and help doesn't know anything about this issue. I investigated Inno Setup sources and found appending VersionInfo just for setup file:
{ Update version info }
AddStatus(SCompilerStatusUpdatingVersionInfo);
UpdateVersionInfo(ExeFile, VersionInfoVersion, VersionInfoProductVersion, VersionInfoCompany,
VersionInfoDescription, VersionInfoTextVersion,
VersionInfoCopyright, VersionInfoProductName, VersionInfoProductTextVersion);
{ For some reason, on Win95 the date/time of the EXE sometimes
doesn't get updated after it's been written to so it has to
manually set it. (I don't get it!!) }
UpdateTimeStamp(ExeFile.Handle);
finally
ExeFile.Free;
end;
end;
{ Sign }
if SignTools.Count > 0 then begin
AddStatus(SCompilerStatusSigningSetup);
Sign(ExeFileName);
end;
except
EmptyOutputDir(False);
raise;
end;
But I can't found this routines in uninstaller compile code.
Anybody know, is possible place version info to unins000.exe
?
Thank you!
Inno Setup does not support this.
You would have to modify the version info yourself on compile time.
Imo, the only way to access the uninstaller executable before it is linked into the installer is to abuse the
SignTool
"callback". The command set toSignTool
can actually do anything with the executable, not only "sign" it. But it has to "sign" it in any case (Inno Setup explicitly checks that the executable was signed after the "tool" finishes).You can achieve that by setting
SignTool
to a batch file (or other script) that will run the actualsigntool.exe
in the end, but before that, it will modify the version info (e.g. using Resource Hacker command-line).Unfortunately, the accepted solution does not work, because the SignTool "callback" can not be abused in this way. Digging into Inno Setup sources, I found that the compiler uses the following verification after signing uninstall executable:
I found a quick solution for the problem. Inno Setup uses
Setup.e32
file as a template foruninst000.exe
.As Inno Setup is completely portable - you can maintain a separate copy of Inno Setup binaries folder (default is
%ProgramFiles%\Inno Setup 5\
) for each project that needs to have the custom version info in the uninstaller.You have to modify the version info of
Setup.e32
file in each copy of Inno Setup binaries.