Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inno Setup uninstaller VersionInfo

Tags:

inno-setup

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!

like image 600
Dennosaur Avatar asked Dec 13 '25 23:12

Dennosaur


1 Answers

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 to SignTool 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 actual signtool.exe in the end, but before that, it will modify the version info (e.g. using Resource Hacker command-line).

like image 110
Martin Prikryl Avatar answered Dec 16 '25 23:12

Martin Prikryl