Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to externally sign installer/uninstaller executables with Inno Setup

I create an OEM product for my customer. I need to sign the installer and uninstaller executables, as well as the .tmp executables created by Inno Setup at runtime, using my customer's certificate. Is it possible to generate these .exe and .tmp files in advance, provide them to my customer for code signing, and then package them into the final installer? Thanks!

like image 571
Leo.Zhou Avatar asked Oct 29 '25 20:10

Leo.Zhou


1 Answers

You can always sign an installer externally after compiling it.


Regarding an uninstaller (and the temporary self-copies of the installer):

Do not set SignTool (what you won't be anyway, if you want to sign the installer externally), but set SignedUninstaller:

[Setup]
SignedUninstaller=yes

Then the compiler will abort on the first run with:

Creating new signed uninstaller file: C:\outputpath\uninst-x.x.x-xxxxxxxxxx.e32

Error in C:\path\Example1.iss: Signed uninstaller mode is enabled. Using an external code-signing tool, please attach your digital signature to the following executable file: C:\outputpath\uninst-x.x.x-xxxxxxxxxx.e32

You can now take this uninstaller, have it externally signed by your customer and put it back. Next time you compile, the compiler will pick up the signed uninstaller and use it:

Using existing signed uninstaller file: C:\outputpath\uninst-x.x.x-xxxxxxxxxx.e32

That will keep working, as long as the uninstaller does not change. That is typically until you bump the AppVersion or upgrade Inno Setup (for details, see SignedUninstaller documentation, and also How do I keep Inno Setup 6 from creating new signed uninstallers?).

like image 60
Martin Prikryl Avatar answered Oct 31 '25 10:10

Martin Prikryl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!