How to sign CAB file using signtool.exe?
- I have 3 files mycert.cer mycert.pvk mycert.spc
Could someone please explain me - what this files should I use for?
- I need to sign Test.cab file开发者_StackOverflow社区 using signtool.exe from command line. But I do not understand - how to do it. Manual http://msdn.microsoft.com/en-us/library/8s9b9yaz(VS.80).aspx is not very good :(
Thank you in advance.
The Microsoft Support Page explains exactly what you're trying to do. It is an outdated tutorial on "signcode.exe" which is similar but not equal to "signtool.exe".
If you want a simple solution, you may want to try signtool's wizard mode (execute signtool signwizard
), e.g. explained here. But if command line execution is needed, check out the examples on Microsoft's support page.
I just spend about 1 hour to get working this stuff. So I did it without certificate's password.
Just to simplify all commands use following steps
Use this folder C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin
Copy to this folder your MyApp.cab file.
Create 2 files using this command without password as I did. Ignore to input password in popup that appears.
makecert -r -pe -n "CN=yourcompanyaddress.com" -b 01/01/2016 -e 01/01/2030 -sky exchange companyCert.cer -sv companyPvk.pvk
- After this execute another command to create PFX file
pvk2pfx.exe -pvk companyPvk.pvk -spc companyCert.cer -pfx companyPfx.pfx
So now you see in this folder companyPfx.pfx
- And finally sign your CAB file like this using PFX file
SignTool sign /f companyPfx.pfx MyApp.cab
- Open properties of this file and you should see that it is signed already.
I hope it will be useful.
Check this Steps to sign a file using Signtool.exe http://blogs.msdn.com/b/winsdk/archive/2009/11/13/steps-to-sign-a-file-using-signtool-exe.aspx
精彩评论