3
  1. I have 3 files
    mycert.cer
    mycert.pvk
    mycert.spc

Could someone please explain me - what this files should I use for?

  1. I need to sign Test.cab file 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.

Volodymyr Bezuglyy
  • 16,295
  • 33
  • 103
  • 133

3 Answers3

2

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.

AndiDog
  • 68,631
  • 21
  • 159
  • 205
2

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

  1. Use this folder C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin

  2. Copy to this folder your MyApp.cab file.

  3. 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

  1. 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

  1. And finally sign your CAB file like this using PFX file

SignTool sign /f companyPfx.pfx MyApp.cab

  1. Open properties of this file and you should see that it is signed already.

I hope it will be useful.

NoWar
  • 36,338
  • 80
  • 323
  • 498
  • Perfect! this signs the `.cab` file. – Zeeshan Aug 04 '16 at 12:52
  • How can I add publisher to `ActiveXControl`? After signing cab file of my ActiveX control, IE not prompts user for installation. It asks for admin permission, I click yes. But setup is still not installed after that. Is it due to `Unknown Publisher`? Can you please guide me on this? – Zeeshan Aug 04 '16 at 12:54
0

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

PSR
  • 875
  • 2
  • 13
  • 37