經常需要重新啟動 Windows 7 才能為安裝程式新增時間戳記...為什麼?

經常需要重新啟動 Windows 7 才能為安裝程式新增時間戳記...為什麼?

我使用 Windows 7(64 位元)電腦作為建置伺服器,並且遇到了一個奇怪的問題。

我的建置步驟之一是使用以下命令應用程式碼簽署憑證:

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

啟動機器後,此命令一次又一次地運行一段時間......然後返回錯誤:

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

重新啟動電腦後,該問題才能解決。該問題也是特定於該特定機器的。

有人有什麼想法嗎?

謝謝,艾倫

答案1

如果它對其他人有幫助,我們透過將簽名程式碼放入批次檔中並在失敗時重試時間戳幾次來「解決」問題。

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

相關內容