SignTool.exe sporadically does not work with exit code 1

As part of our build system, we use signtool.exe with a certificate to sign our binaries after they are created. Sometimes (it’s hard to say when it hits), the signing fails:

error MSB3073: The command "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\signtool.exe" [...] exited with code 1. 

According to MSDN, exit code 1 means that there was a failure while writing the file. I can verify that the file is not signed.

I also noticed that from time to time part of the timestamp is played out with another error message, although the file is still signed (without a timestamp).

How can I eliminate and eliminate these seemingly random, inconsistent signature failures?

+8
source share
5 answers

I strongly suspect an unsuccessful connection to the timestamp server responsible for random failures. Perhaps you check your system event log for currently lost connections.

+5
source

I had the same problem. This is because the MS antimalware process MsMpEng.exe checks the binary file and does not allow anyone to receive it. To solve the problem, I create a binary on a RAM disk and it worked.

+2
source

I just got into this problem in Windows 8.1, so these are not the Windows XP root certificates that some people quote.

I found that the problem was caused by the fact that .exe was also signed.

If you run signtool from the cmd prompt and try to sign it, you will get a useful text message telling you what is wrong (much better than return code 1 from CreateProcess ().

Stopped the current process and was able to sign OK.

+2
source

In my case, the .pfx file in the solution was old. Until someone told me to replace the certificate file with a new, valid one, I continued to receive the "Fails with Exit Code 1" error.

Value, make sure the certificate file is valid and not expired.

+1
source

I get below error when trying to sign files using signUserFiles.exe using cruise control while working, if I run the same command using the command line

unable to find temporary location for signtool. exit ... to cruise control

Please help me, this problem arises when I force to build from a cruise control tool

0
source

All Articles