51

I did a clean install of windows 10 and visual studio 2015 and did not find makecert.exe anywhere. Does some other software need to be installed to get this program back?

I looked in all the folders under "C:\Program Files (x86)\Microsoft SDKs\Windows\\" and did not see it in any.

I also opened the "Developer Command Prompt for VS2015" and tried running "makecert" but it was not found.

Brian McCarthy
  • 757
  • 1
  • 6
  • 11

4 Answers4

51

Install the Windows SDK for Windows 10. If you still can't find it, try the Windows Driver kit.

enter image description here

magicandre1981
  • 27,895
  • 5
  • 86
  • 127
  • 1
    Installing the windows 10 SDK worked. I thought the visual studio 2015 install included the SDK, but maybe not all the components. – Brian McCarthy Aug 02 '15 at 20:58
  • 1
    Since Win8, Microsoft moved tools from VS to the SDK. – magicandre1981 Aug 03 '15 at 04:14
  • 12
    come on microsoft, it is just an .exe, do we really have to download and install the whole SDK. – matthewbaskey Feb 18 '16 at 22:43
  • @matthewbaskey submit the request to include the exe in VS again as feedback on connect: https://connect.microsoft.com/VisualStudio/feedback/ – magicandre1981 Feb 27 '16 at 07:08
  • 17
    It's a 69kb standalone .exe file... I can't begin to imagine why MS refuses to offer this as a standalone download, and instead forces me to install 2.5GB of SDK that I have no intention of using. Sheesh... – Gary Stanton Apr 19 '16 at 12:58
  • 2
    To install only makecert, the "Windows SDK" alone should be selected. Please refer: http://www.virtues.it/2015/08/howto-create-selfsigned-certificates-with-makecert/ – Bala Sakthis May 31 '16 at 08:09
43

As ShaneH answers in this question makecert.exe has been deprecated, and we should use powershell commandlet New-SelfSignedCertificate.

New-SelfSignedCertificate -Subject "CN=Test Code Signing" -Type CodeSigningCert -KeySpec "Signature" -KeyUsage "DigitalSignature" -FriendlyName "Test Code Signing" -NotAfter (get-date).AddYears(5)


For older versions of PS, one can get this script from TechNet: https://gallery.technet.microsoft.com/scriptcenter/Self-signed-certificate-5920a7c6

To make my answer full, below is brief explanation how to use the TechNet script:

  1. Navigate to link above and download New-SelfSignedCertificateEx.zip file
  2. Unzip it somewhere
  3. Run PowerShell console and navigate to location with new file
  4. Run command .\New-SelfSignedCertificateEx to call function. Remember to append necessary parameters.

.\New-SelfsignedCertificateEx -Subject "CN=Test Code Signing" -EKU "Code Signing" -KeySpec "Signature" -KeyUsage "DigitalSignature" -FriendlyName "Test code signing" -NotAfter [datetime]::now.AddYears(5)

Two additional notes if you are having problem with this tool.

  1. If PowerShell moans that scripts are disabled, run console as administrator and call this: Set-ExecutionPolicy unrestricted
  2. If PowerShell still refuses to run it, make sure you've prepended .\ (dot-slash) before the name of the file, as this is necessary.
Joe Johnston
  • 2,794
  • 2
  • 31
  • 54
komsky
  • 1,568
  • 15
  • 22
  • How would I accomplish this with Powershell? https://joekiller.com/2012/04/03/creating-a-x-509-or-signing-certificate-for-aws-ec2-using-powershell-and-windows-sdk/ I couldn't find ANY info. – AlexB Jul 12 '16 at 17:40
  • Everything is in the link in my comment. Download NewSelfSignedCertificateEx.zip, and then run PowerShell command: New-SelfsignedCertificateEx -Subject "CN=Test Code Signing" -EKU "Code Signing" -KeySpec "Signature" ` -KeyUsage "DigitalSignature" -FriendlyName "Test code signing" -NotAfter [datetime]::now.AddYears(5) – komsky Jul 13 '16 at 13:07
  • 2
    Just a quick note: I could not get `.\New-SelfsignedCertificateEx` to work (no error, no certificate) until I ran `Import-Module .\New-SelfSignedCertificateEx.ps1`. After that I could use `New-SelfsignedCertificateEx` (without the leading ".\") and the script worked fine. – sherb Jun 19 '17 at 23:30
  • 1
    It works for me in this order: 1. Run `Windows Powershell` as `Administrator` -> 2. Run `Set-ExecutionPolicy unrestricted` -> 3. Run `New-SelfSignedCertificate -Subject "CN=Test Code Signing" -Type CodeSigningCert -KeySpec "Signature" -KeyUsage "DigitalSignature" -FriendlyName "Test Code Signing" -NotAfter (get-date).AddYears(5)` – Minh Nguyen Nov 08 '17 at 09:13
5

A quick search of my C: found that makecert.exe seems to be distributed with Fiddler 2 in the C:\Program Files (x86)\Fiddler2 folder. This is a much smaller download than the full Windows SDK.

For the record I have version 4.6.20171.26113 of Fiddler 2.

Matt Frear
  • 52,283
  • 12
  • 78
  • 86
3

After downloading the Windows SDK for Windows, to install the "makecert.exe" you only have to check the "Windows Software Development Kit".

enter image description here

Benjamin Nguyen
  • 251
  • 3
  • 8