5

I have Inno Setup with Inno Script Studio installed, along with Visual Studio 2013. I have a digital certificate, protected with a password, named certificate.p12. I also have the Windows 8.1 driver SDK installed (although I'm running Windows 7 Professional x64). The compiled output I'm including in my installer is already signed.

I configured Inno Script Studio with a sign tool named my_signtool and with this command:

"C:\Program Files (x86)\Windows Kits\8.1\bin\x64\signtool.exe" sign /f "z:\full\path\to\certificate.p12" /p "password" $f

...and in my .iss file, I have:

SignTool=my_signtool

With this setup on my computer, it works perfectly. I compile the project and Inno Setup automatically signs the installer and its uninstaller.

But, I have a colleague with what should be the exact same setup. He has Visual Studio 2013, Inno Setup and Inno Script Studio, a copy of the certificate, and its password. When he tries to compile it, Inno Setup fails by saying attempting to run the signtool against uninst.e32.tmp returns 0x1. When he runs the exact command it tries to run manually in the command prompt, it fails by stating uninst.e32.tmp isn't available, but that seems normal because I suspect Inno Setup is just cleaning up after itself after the error (or is it?).

I've tried replacing the quotes with $q in the definition of the sign tool to no avail. In fact, aside from the path to signtool.exe itself, none of the paths involved have spaces in them anyway.

Both our outputs look like this initially. Immediately after this is where they diverge: mine continues to run, and his complains that the sign tool failed with 0x1.

Starting compile.  [Monday, January 12 2015 at 10:11:03 AM]
Compiling script with Inno Setup 5.5.5 (a) [ISDLLCompileScriptA]

[PreCompile] Processing.
[PreCompile] Processing is still being tested.
[PreCompile] Processing finished.

[ISPP] Preprocessing.
[ISPP] Preprocessed.

Parsing [Setup] section, line 14
...
Parsing [Setup] section, line 41
Reading file (WizardImageFile)
   File: C:\Program Files (x86)\Inno Setup 5\WIZMODERNIMAGE.BMP
Reading file (WizardSmallImageFile)
   File: C:\Program Files (x86)\Inno Setup 5\WIZMODERNSMALLIMAGE.BMP
Preparing Setup program executable
   Updating icons (SETUP.E32)
   Running Sign Tool command: "C:\Program Files (x86)\Windows Kits\8.1\bin\x64\signtool.exe" sign /f "z:\full\path\to\certificate.p12" /p "password" "Z:\full\path\to\uninst.e32.tmp"

Any guess what simple detail I'm overlooking where my environment works fine every time, but his fails even though it's configured the same way?

user3466413
  • 805
  • 1
  • 7
  • 16
  • He must have had a typo in the sign tool command as changing that to match mine (except for path changes) now works. But, keeping the question in case it helps someone sign with Inno Setup. – user3466413 Jan 14 '15 at 20:55
  • This is old, but I recently encountered a similar problem. In my case, the compile output folder (where the setup file is created) was in my dropbox folder. I was experiencing errors saying "Unable to locate unist.e32.tmp" and "File is in use by another process". The "File is in use by another process" is easily explained by dropbox syncing the file. But the unist.e32.tmp was the most persistance error message that I finally got to go away by changing the Compile Output folder to a different folder (my documents in my case). I cannot explain why that worked, but it did! – John S Jan 16 '16 at 01:16

2 Answers2

3

I had this same issue and just needed to run Inno Script Studio as Administrator and then I had no problem.

2

I also had this problem, but running as Admin did not solve the issue. In the end, I can't explain it, but I changed where I got my timestamp and then it all worked fine -- though there was something else that was throwing me off.

I am using InnoSetup 5.5.9 with signtool. I added a SignTool which I defined as:

"C:\PATH_TO_KSIGN\kSign\signtool.exe" sign /f "MYCERT.pfx" /t "http://tsa.starfieldtech.com" /p "MYPASSWORD" $f

The standard timestamp field from the example pages is "http://timestamp.comodoca.com/authenticode". If I use that, the process fails with the errors from the original question.

The other thing that threw me was that if I run the resulting setup build through InnoSetup, it tells me "Publisher: unknown". However, if I take the same installer and run it on a different machine, then it gets the Publisher correct.

I hope this can help someone!

-jonathan

user150812
  • 99
  • 1
  • 9