The short answer
Define a Sign Tool (a name plus a SignTool command ending in $f) in the Inno Setup Compiler IDE or with ISCC's --signtool option, then add SignTool=<name> to the [Setup] section. Inno Setup then signs Setup, the uninstaller and the temporary self-copies Setup uses while it runs. Signing setup.exe yourself after compiling leaves those self-copies unsigned by default, and security software can block them.
On this page
- What do you need before you start?
- How do you define a Sign Tool?
- What goes in the [Setup] and [Files] sections?
- Why not sign setup.exe after compiling?
- How do you sign from the command line or a build?
- Which timestamp server should you use?
- How do you check the signed installer? (tested)
- What goes wrong, and how do you fix it?
- FAQ
What do you need before you start?
To sign an Inno Setup installer you need four things on the Windows build machine: Inno Setup itself, Microsoft's signtool.exe from the Windows SDK, a code signing certificate whose private key Windows can reach, and the URL of an RFC 3161 timestamp server. Inno Setup does not sign anything on its own; it runs the signing command you give it.
- Inno Setup. The current release is Inno Setup 7.1.1, published on October 28, 2026. The directives on this page are taken from its help files.
- SignTool. Microsoft recommends SHA-256 for the file digest (
/fd), and says a missing/fdproduces a warning in older SignTool builds and an error in later ones. Our SignTool guide covers installing it. - A code signing certificate. Since June 1, 2023 the private key of every publicly trusted code signing certificate has to be generated and kept in hardware, either a USB token or a cloud HSM, so there is no PFX file to point Inno Setup at. A Certum code signing certificate from My-SSL keeps the key in Certum's cloud and needs the SimplySign mobile app and SimplySign Desktop connected before SignTool can see it.
- A timestamp URL. Certum's is
http://time.certum.pl; any RFC 3161 server works with SignTool's/troption.
How do you define a Sign Tool in Inno Setup?
A Sign Tool is a name mapped to a command line. You define it once, outside the script, either in the Compiler IDE under Tools | Configure Sign Tools... or on the ISCC command line. The name cannot contain spaces or an equals sign, and the command must contain $f, which Inno Setup replaces with the quoted name of each file it signs.
Three other sequences are available: $q becomes a double quote (useful when the whole definition is itself quoted on a command line), $p becomes whatever parameters the script passes, and $ becomes a literal dollar sign. For a certificate in the Windows store, including a token or SimplySign certificate, a definition named mysign looks like this:
mysign=signtool.exe sign /fd sha256 /tr http://time.certum.pl /td sha256 /sha1 <certificate thumbprint> /d $qMy App$q $f/sha1 picks the certificate by its SHA-1 thumbprint, which Microsoft describes as the option to use when several certificates would otherwise match. /n with part of the subject name also works; /a lets SignTool choose the certificate that is valid for longest, which can surprise you on a machine that holds more than one. /d adds a description of the signed content. If signtool.exe is not on the PATH, give the full path and wrap it in $q when it contains spaces.
What goes in the [Setup] and [Files] sections?
In the script, SignTool=mysign under [Setup] switches signing on. From that one line Inno Setup signs Setup, the uninstaller and the temporary self-copies, and SignedUninstaller defaults to yes whenever a SignTool is set. Files you ship inside the installer are not signed unless you mark them with a flag in [Files].
[Setup]
AppName=My App
AppVersion=2.4.0
DefaultDirName={autopf}\My App
SignTool=mysign
; retry a failed signing twice, 500 ms apart (these are the defaults)
SignToolRetryCount=2
SignToolRetryDelay=500
[Files]
Source: "bin\MyApp.exe"; DestDir: "{app}"; Flags: sign
Source: "bin\MyCore.dll"; DestDir: "{app}"; Flags: signonce
Source: "vendor\thirdparty.dll"; DestDir: "{app}"; Flags: signchecksign signs the original source file before Inno Setup stores it; signonce does the same only if the file is not already signed; signcheck only checks that a signature is present. Both sign and signonce are ignored when no SignTool is set, so a script that forgets the [Setup] line ships those files unsigned. The DLL signing guide explains why the DLLs matter as much as the EXE.
You can also list several SignTool lines in [Setup]; Inno Setup runs them in order. Its help file uses that to add a SHA-1 signature next to a SHA-256 one. A single SHA-256 signature, as in the example above, follows Microsoft's current recommendation.
Why not just sign setup.exe after compiling?
Because setup.exe is not the only executable that runs. Inno Setup's documentation warns that Setup may start temporary copies of itself, and that if you sign Setup yourself after compilation "these copies are not signed by default". Security software can then block them, and the installer fails to start.
The example the documentation gives is Microsoft Defender's attack surface reduction rule "Block executable files from running unless they meet a prevalence, age, or trusted list criterion". None of the five top search results we read for "inno setup signtool" mentions the self-copies, and the failure shows up on a customer's PC rather than as a build error.
If your signing really has to happen outside the compiler, the documented fallback is SignedUninstaller=yes without a SignTool. On the first compile Inno Setup writes an unsigned uninstaller copy to the SignedUninstallerDir folder (the output folder by default) and asks you to sign it; later compiles reuse the signed copy and sign the self-copies with it. Changing Inno Setup versions, the setup icon, the wizard style or the version info creates a new copy to sign. A signed uninstaller also writes its language messages to a separate unins???.msg file, because embedding them would break the signature.
How do you sign from the command line or a build server?
ISCC.exe, the command-line compiler, takes the Sign Tool definition with --signtool=name=command or the short form /S, so the definition can live in your build script instead of the IDE settings. Sign Tools configured in the IDE are added automatically unless you pass --no-ide-signtools.
iscc "/Smysign=signtool.exe sign /fd sha256 /tr http://time.certum.pl /td sha256 /sha1 <thumbprint> $f" setup.iss
rem development build without signing
iscc /ns setup.iss/ns (--no-signing) overrides both SignTool and SignedUninstaller, which keeps unsigned test builds from touching your certificate. ISCC exits with 0 on success, 1 for bad parameters or a fatal error and 2 when the compile fails, so a signing failure that survives the retries stops the pipeline.
Two directives help on busy builds. SignToolRetryCount (default 2) and SignToolRetryDelay (default 500 ms) retry a failed signing call, and SignToolMinimumTimeBetween spaces signing calls apart, which Inno Setup suggests for timestamp services that rate-limit. An installer with many signed files can make dozens of calls in one compile.
One honest limit for cloud certificates: Certum's signing manual documents SimplySign Desktop logins with a code from the mobile app and no unattended mode, so an Inno build that signs with a SimplySign certificate needs a session someone has logged in to. Our code signing in CI/CD guide compares the options for fully automated pipelines.
Which timestamp server should you use?
Use any RFC 3161 server with /tr and /td sha256, preferably your CA's. A timestamp proves the file was signed while the certificate was valid; without one, the signature becomes invalid when the certificate expires and Windows treats the installer as unsigned. Code signing certificates now last at most 460 days, so that day comes quickly.
We sent an RFC 3161 request to Certum's server on November 19, 2026 with OpenSSL 3.0.13. It answered with a granted SHA-256 timestamp from "Certum Timestamp 2026":
$ openssl ts -query -data file.bin -sha256 -cert -out req.tsq
$ curl -H "Content-Type: application/timestamp-query" \
--data-binary @req.tsq http://time.certum.pl -o resp.tsr
$ openssl ts -reply -in resp.tsr -text
Status: Granted.
Policy OID: 1.2.616.1.113527.2.5.1.11
Hash Algorithm: sha256
Time stamp: Nov 19 12:59:04 2026 GMT
TSA: DirName:/C=PL/O=Asseco Data Systems S.A./CN=Certum Timestamp 2026Most of Inno Setup's own help examples still use the older /t option, which is not the RFC 3161 protocol. /tr with /td sha256 is the RFC 3161 form, and Microsoft recommends SHA-256. More on why the timestamp matters is in code signing timestamping.
How do you check the signed installer? (tested)
On Windows, run signtool verify /pa /v against the output file. /pa uses the default authentication policy for ordinary software; without it SignTool checks against the Windows driver verification policy, which an ordinary installer usually fails. Exit code 0 means verified, 1 failed and 2 completed with warnings. Install the program once and check unins000.exe the same way.
signtool verify /pa /v Output\mysetup.exe
signtool verify /pa /v "C:\Program Files\My App\unins000.exe"From Linux or a CI container you can use osslsigncode. We checked Inno Setup 7.1.1's own installer, which its authors sign, on Ubuntu 24.04 with osslsigncode 2.8 on November 19, 2026:
$ osslsigncode verify -in innosetup-7.1.1-x64.exe
Message digest algorithm : SHA256
Current message digest : 2D6A3736…0FA557
Calculated message digest : 2D6A3736…0FA557
Signer #0: Subject: /C=NL/ST=Noord-Holland/O=Pyrsys B.V./CN=Pyrsys B.V.
Timestamp time: Oct 26 14:12:46 2026 GMT
Timestamp Server Signature verification: ok
Error: unable to get local issuer certificate
Signature verification: failedThe file is intact (both digests match) and properly timestamped, yet the result is "failed". The chain ends at a root, AAA Certificate Services, that is not in Ubuntu's ca-certificates bundle. That bundle is taken from Mozilla's root store, which covers websites and email, not Windows code signing. On Linux, read the digest and timestamp lines, or give osslsigncode the right root with -CAfile; treat Windows' signtool verify as the verdict that matters. Our guide to verifying a code signature covers both tools in detail. We could not run the Inno Setup compiler itself in our Linux test environment, so the compile steps above come from the Inno Setup documentation, not a test build.
What goes wrong, and how do you fix it?
Most Inno Setup signing failures come from the Sign Tool definition rather than the certificate: a name the compiler does not know, a command without $f, or a path broken by quotes. The rest are SignTool not finding the key and timestamp servers refusing a burst of requests.
| Symptom | Likely cause | Fix |
|---|---|---|
| Compiler error naming the Sign Tool | The name in SignTool= is not defined in the IDE or with /S | Define it in Tools | Configure Sign Tools... or pass it to ISCC |
| SignTool fails with a path or file error | Missing $f, or a path with spaces not wrapped in $q | End the command with $f; quote the tool path with $q |
| SignTool finds no certificate | Token software or SimplySign Desktop not connected, or wrong thumbprint | Connect first; copy the thumbprint again from the certificate |
| Timestamp errors on large builds | The timestamp service rate-limits many calls | Set SignToolMinimumTimeBetween, for example 5000 |
| Long pause after users start a big setup | Windows checks the signature over all the data in one EXE | Enable disk spanning with DiskSliceSize=max |
| Setup blocked on managed PCs | Setup was signed after compiling; self-copies are unsigned | Sign through the SignTool directive |
The last two rows come straight from Inno Setup's SignTool help page, which also notes that files in the separate .bin slices are still checked against SHA-256 hashes stored inside the signed setup.exe. For SignTool's own error messages, see SignTool errors and fixes, and for the warning users see before your reputation builds, SmartScreen publisher reputation.
Frequently Asked Questions
Quick answers to related questions.
Do I need an EV certificate to sign an Inno Setup installer?
No. Inno Setup calls SignTool the same way for a Standard (OV) or an EV code signing certificate. Microsoft now says EV certificates no longer bypass SmartScreen, so EV matters for things like the Windows Hardware Developer Program or a buyer's procurement rules, not for the download warning.
Will a signed installer stop the SmartScreen warning?
Not straight away. A valid signature replaces "Unknown publisher" with your verified name, but Microsoft says a newly signed file can still be flagged as unrecognized until it builds reputation. Signing every release with the same certificate is what lets that reputation carry over to new builds.
Is ISSigTool the same as code signing?
No. ISSigTool, which ships with Inno Setup, signs files with its own ECDSA P-256 keys so that an installer can check files it downloads or carries. Windows does not read those signatures, so they do not show a publisher name or affect SmartScreen. For that you need an Authenticode signature from a code signing certificate, applied through the SignTool directive.
Can I sign with a certificate on a USB token or in the cloud?
Yes. Since June 1, 2023 every publicly trusted code signing key has to live in hardware, so tokens and cloud HSMs are the normal case. SignTool reaches the key through the Windows certificate store once the token's software, or SimplySign Desktop for a Certum cloud certificate, is connected; select the certificate by its thumbprint with /sha1.
Need a certificate for your Inno Setup builds?
My-SSL sells Certum Standard code signing certificates for individual developers and organizations, delivered through Certum's SimplySign cloud service with no USB token to ship. For background on how the certificate works, start with code signing certificates explained.