Constantly having to restart Windows 7 to time-stamp installer… Why?

Posted on

QUESTION :

I am using a Windows 7 (64-bit) machine as a build server and have encountered a strange problem.

One of my build steps is to apply a code signing certificate using a command like this:

signtool sign /v /sm /s my /n "Company" /t http://timestamp.verisign.com/scripts/timestamp.dll /d "Software Name" "installer.msi"

After starting up the machine, this command works time after time for a while… and then it returns the error:

SignTool Error: The specified timestamp server either could not be reached or returned an invalid response.

The problem cannot be resolved until the computer is rebooted. The problem is also specific to this particular machine.

Does anyone have any ideas?

Thanks,
Alan

ANSWER :

In case it is helpful for anyone else, we “resolved” the problem by putting the signing code into a batch file and retrying the timestamp a few times if it fails.

signtool sign /a /v /sm /s  my /n "Company" /d "Software Name" "installer.msi"
signtool timestamp /t http://timestamp.verisign.com/scripts/timestamp.dll "Software Name" "installer.msi"
if ERRORLEVEL 0 GOTO END
signtool timestamp /t http://timestamp.verisign.com/scripts/timestamp.dll "Software Name" "installer.msi"
if ERRORLEVEL 0 GOTO END
signtool timestamp /t http://timestamp.verisign.com/scripts/timestamp.dll "Software Name" "installer.msi"
:END

Leave a Reply

Your email address will not be published.