EDITED:
I have problems with InnoSetup and signtool. The following works perfectly from the Command Line (I reverted from PowerShell in my original post to CMD).
"c:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\signtool.exe" sign /f certificate.p12 /p password /t http://timestamp.verisign.com/scripts/timstamp.dll MyApp.exe
However, if I put the same line in InnoSetup IDE (adding $f at the end as requested by InnoSetup), it fails with "sign tool failed with exit code 0x1". I have already seen the following answer, however as on the command line it works fine, it doesn't help. Without the codetool line "SignTool=signtool", InnoSetup compiles correctly.