使用批处理最方便。
- 下载签名相关文件
- https://quantum6.blog.csdn.net/article/details/121078445https://quantum6.blog.csdn.net/article/details/121078445
- 产生签名所用文件
@ECHO OFF SET TSIT_NAME=quantum6 SET PASSWORD=Q6@&A$%3 REM 会要求输入密码 Makecert -sv %TSIT_NAME%.pvk -r -n "CN=柳鲲鹏,EMAIL=quantum6@yeah.net" %TSIT_NAME%.cer Cert2spc %TSIT_NAME%.cer %TSIT_NAME%.spc Pvk2Pfx -pvk %TSIT_NAME%.pvk -pi %PASSWORD% -spc %TSIT_NAME%.spc -pfx %TSIT_NAME%.pfx -f
对多个文件进行签名
@ECHO OFF SET TSIT_NAME=quantum6 SET PASSWORD=Q6@&A$%3 SET HTTP_TIMESTAMP=http://timestamp.digicert.com/scripts/timestamp.dll SET DEST_DIR=..\TEST ECHO - for %%i in (Office.exe ^ TPlayerCore.dll ^ ) ^ do ( ECHO Sign %%i now! IF EXIST %DEST_DIR%\%%i ( SignTool sign /f %TSIT_NAME%.pfx /p %PASSWORD% %DEST_DIR%\%%i SignTool timestamp /t %HTTP_TIMESTAMP% %DEST_DIR%\%%i ) ECHO - )
- 签名结果