makecert.exe missing in windows 7, how to get it and use it - windows-7

I am using Windows 7. I don't have the makecert.exe, which I came to know when I tried to run commands to generate certificates like
makecert -sk XYZ -n "CN=XYZ Company" testXYZ.cer
I get error :
'makecert' is not recognised as an internal or external command, operable program or batch file.
Pls suggest how to resolve this issue. Do i need to install the Windows SDK again.
Regards,
Pravin.

makecert.exe comes with both Visual Studio and the Windows SDK. Therefore just use either the Visual Studio Command Prompt or the Windows SDK command prompt and it will work straight out of the box as it will be included in the command prompt path.
makecert is included in the ".NET Development > Tools" bucket.
This selected bucket includes the makecert utility (at least in SDK v7.1).

C:\Program Files (x86)\Windows Kits\8.0\bin\x64
OR
C:\Program Files (x86)\Windows Kits\8.0\bin\x86

You can find a version of makecert here : http://www.inventec.ch/chdh/notes/makecert_5_131_3790_0.zip. Also instructions on how to use it here : http://www.inventec.ch/chdh/notes/14.htm

Have you read this link: MakeCert? It sends you to Microsoft Windows Software Development Kit from where you can download the SDK including makecert

I know its too late to reply, however it might help other looking out for this executable.
if you have installed VS 2005, you will find it under
C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin
if you have installed VS 2008, you will find it under
C:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\SDKTools
go to this location on command prompt and then run you "makecert" command with arguments.

MakeCert.exe is now deprecated. You should use PowerShell's New-SelfSignedCertificate cmdlet to create a selfsigned certificate.

You can find it on microsoft sdks directory:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\makecert.exe

My copy (with Visual Studio 2017 installed) was here: "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\makecert.exe"

Ran into the same problem awhile back and thought I would share the link I found to download and install this tool.
http://go.microsoft.com/fwlink/p/?linkid=84091
Please let me know if this works if you do get around to it, I realize this post is a little old.

Windows 10 after installing Windows SDKs:
If you have ARM microprocessor: C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\arm64
Intel microprocessor: C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64
Add that folder to your PATH environment variable

Related

How to install SignTool.exe for Windows 10

How to install SignTool.exe in Visual Studio 2015 for Windown 10?
I tried to build my project but the program threw an error :
Error An error occurred while signing: SignTool.exe not found.
You need to install the Windows 10 SDK.
Visual Studio 2015 Update 1 contains it already, but it is not installed by default. You should go to Control Panel -> Programs and Features, find Microsoft Visual Studio 2015 and select "Change".
Visual Studio 2015 setup will start. Select "Modify".
In Visual Studio components list find "Universal Windows App Development Tools", open the list of sub-items and select "Windows 10 SDK (10.0.10240)".
Windows 10 SDK in VS 2015 Update 1 Setup
Of cause you can install Windows 10 SDK directly from Microsoft: https://go.microsoft.com/fwlink/?LinkID=698771
As josant already wrote - when the installation finishes you will find the SignTool.exe in the folders:
x86 -> c:\Program Files (x86)\Windows Kits\10\bin\x86
x64 -> c:\Program Files (x86)\Windows Kits\10\bin\x64\
If you only want SignTool and really want to minimize the install, here is a way that I just reverse-engineered my way to:
Download the .iso file from https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk (current download link is http://go.microsoft.com/fwlink/p/?LinkID=2022797) The .exe download will not work, since it's an online installer that pulls down its dependencies at runtime.
Unpack the .iso with a tool such as 7-zip.
Install the Installers/Windows SDK Signing Tools-x86_en-us.msi file - it's only 388 KiB large. For reference, it pulls in its files from the following .cab files, so these are also needed for a standalone install:
4c3ef4b2b1dc72149f979f4243d2accf.cab (339 KiB)
685f3d4691f444bc382762d603a99afc.cab (1002 KiB)
e5c4b31ff9997ac5603f4f28cd7df602.cab (389 KiB)
e98fa5eb5fee6ce17a7a69d585870b7c.cab (1.2 MiB)
There we go - you will now have the signtool.exe file and companions in C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64 (replace x64 with x86, arm or arm64 if you need it for another CPU architecture.)
It is also possible to commit signtool.exe and the other files from this folder into your version control repository if want to use it in e.g. CI scenarios. I have tried it and it seems to work fine.
(All files are probably not necessary since there are also some other .exe tools in this folder that might be responsible for these dependencies, but I am not sure which ones could be removed to make the set of files even smaller. Someone else is free to investigate further in this area. :) I tried to just copy signtool.* and that didn't work, so at least some of the other files are needed.)
Here's where you'll find it:
C:\Program Files (x86)\Windows Kits\10\App Certification Kit
Screenshot:
Best solution end of 2020:
Just download Windows 10 SDK from Microsoft here:
https://go.microsoft.com/fwlink/?LinkID=698771
In setup, choose only Windows App Certification App (it's only 184 MB)
You can find signtool.exe here:
%PROGRAMFILES(X86)%\Windows Kits\10\bin\x64
Cheers!
As per the comments in the question... On Windows 10 Signtool.exe and other SDK tools have been moved into "%programfiles(x86)%\Windows Kits\".
Typical path to signtool on Windows 10.
32 bit = "c:\Program Files (x86)\Windows Kits\10\bin\x86\signtool.exe"
64 bit = "c:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe"
Tools for SDK 8.0 and 8.1 also reside in the "Windows Kits" folder.
Another answer from 2021.
You might not need Windows SDK at all. If you have VS-2019 installed, you might already have signtool in C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe
NOTE: The good thing about this particular signtool version (compared to the Windows SDK one), is that it's self-contained, and does not need all the dll's next to it (mssign32.dll, wintrust.dll etc, which usually lie around in Windows SDK folders).
You can even add this file to your source code repo (just one file), since this tool hasn't changed since 2016.
P.S. I had this signtool even without "ClickOnce publishing" component installed in my Visual Studio Community Edition.
Location:
C:\Program Files (x86)\Windows Kits\10\App Certification Kit\signtool.exe
In 2019, this is a quite recent link from Microsoft about how to obtain this tool:
The SignTool tool is a command-line tool that digitally signs files,
verifies signatures in files, or time stamps files. For information
about why signing files is important, see Introduction to Code
Signing. The tool is installed in the \Bin folder of the Microsoft
Windows Software Development Kit (SDK) installation path.
SignTool is available as part of the Windows SDK, which you can
download from https://go.microsoft.com/fwlink/p/?linkid=84091.
I only needed signtool, so I chose the minimal I came up with and signtool.exe is now in C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe
Microsoft article link:
https://learn.microsoft.com/en-us/windows/win32/seccrypto/signtool
to install just the signingtools from the winsdksetup.exe (available at the same url as the windows sdk iso mentioned above) this is an option to, straight from the Dockerfile i'm working in:
RUN powershell Start-Process winsdksetup.exe -ArgumentList '/features OptionId.SigningTools', '/q', '/ceip off', '/norestart', -NoNewWindow -Wait
so if you're in windows then that'd be:
winsdksetup.exe /features OptionId.SigningTools
winsdksetup /h gives you the options, so i won't summarise them here.
I include the dockerfile snippet, as that is what i started my day looking for the solution for.
You don't have to install the Signtool. It might already be there.
Go to C:\Program Files (x86)\ and search for signtool.exe. In my system I found it under C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool
No matter which version of Windows you are using, the above signtool will solve your purpose.
If you're using VS Express 2015, just go to your control panel --> programs and features --> select vs 2015 --> click change, then in the VS Express installer select 'Modify' --> select Publishing tools, and finish. Once setup completes the changes you will be able to create your installer.
You should go to Control Panel -> Programs and Features, find Microsoft Visual Studio 2015 and select "Change".
Visual Studio 2015 setup will start. Select "Modify".
In Visual Studio components list, open the list of sub-items and select "ClickOnce Publication Tools" and "Windows 10 SDK" too.
I did a modify with the Visual Studio from Control Panel, Programs and Features. The SDK was not at first apparent so I installed the Common Tools which lo and behold did include the SDK Update 3.
It's available many, many places, depending upon what is installed:
On my box, every one except the v6.0A SDK version supports the /fd option.
SignTool is available as part of the Windows SDK (which comes with Visual Studio Community 2015). Make sure to select the "ClickOnce Publishing Tools" from the feature list during the installation of Visual Studio 2015 to get the SignTool.
Once Visual Studio is installed you can run the signtool command from the Visual Studio Command Prompt.
By default (on Windows 10) the SignTool will be installed in:
C:\Program Files (x86)\Windows Kits\10\bin\x86\signtool.exe
For me in 2021 the signtool.exe was here: "C:\Program Files (x86)\Windows Kits\10\bin\x64" or in: x86
and not under: C:\Program Files (x86)\Windows Kits\10\App Certification Kit
even if I have this folder and may files in it.
I ran into an issue using this tool in a restrictive Azure DevOps Pipelines environment, where I couldn't even expand PATH or call any tools from an absolute path outside of the ADO build directories, meaning in this case anything from C:\Program Files (x86)\
My solution was to package it as a Secure File in ADO Pipelines' Library -> Secure Files section, allow my pipeline to access the file via its security settings, then download it as a build task and run it via a powershell task.
In the example below, I just query the help with the /? command. Just replace that with whatever command you want to use.
- task: DownloadSecureFile#1
displayName: "Signtool Download"
name: MSSignTool
inputs:
secureFile: 'signtool.exe'
- task : PowerShell#2
displayName: "Run Signtool"
inputs:
targetType: "inline"
script: $(MSSignTool.secureFilePath) /?
Warning 1: I'm not sure what dependencies are required for signtool.exe to work standalone, or if it even has any. The Windows 10 SDK and ADK was already installed in this build environment. If querying the help causes the tool to fail or crash, make sure one or both of those are installed. Hopefully you will have access to something like choco to install any missing dependencies.
Warning 2: Be careful if copying those code segments. ADO is pretty strict with dynamic whitespace, so if your spacing is off it will brick your whole pipelines file until you adjust the spacing to its correct position.

Cannot install .Vsix package

I have troubles with .vsix installation.
If I launch the .vsix from the explorer, instead of suggesting me to install the package, I get the same ouput as Vsixintaller.exe /? (it displays the command line usage).
I also tried to run the following command line :
VSIXInstaller.exe /skuname:Pro "fullpathto\NuGet.Tools.vsix"
Same output (command line usage is displayed).
What can be wrong ?
I'm suspecting a wrong registry registration, but I couldn't find the source of the problem.
Here is what I have in my registry :
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vsix] #="Microsoft Visual
Studio Extension"
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vsix\DefaultIcon]
#="C:\Program Files (x86)\Common Files\Microsoft
Shared\MSEnv\VSFileHandler.dll,-221"
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vsix\Shell]
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vsix\Shell\Open]
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vsix\Shell\Open\Command]
#="\"C:\Program Files (x86)\Common Files\Microsoft
Shared\MSEnv\VSLauncher.exe\" \"%1\""
[HKEY_CLASSES_ROOT.vsix] "Content Type"="application/vsix"
#="VisualStudio.Launcher.vsix"
[HKEY_CLASSES_ROOT.vsix\OpenWithProgids]
"VisualStudio.Launcher.vsix"=""
Any idea ?
PS: my computer is running W2K8 R2 x64, and I use VS 2010 Pro.
I cannot use Visual Studio integrated extension manager because of a proxy server not working with the gallery (don't know why)
Oh ... finally found the issue.
VSix Installer does not seems to be able to install from a network share.
With local copies of vsix, it worked. Strange.

pvk2pfx.exe - can not find

Could tell me where to find the file pvk2pfx.exe?
It is supposed to be located in <programfile>/Visual Studio 8/Common7/Tools/bin/pvk2pfx.exe, but not on my machine.
I don't seem to be able to find it online either. I tried installing the SDK, but it didn't work.
Have you checked the SDK path? The SDK path on my machine where pvk2pfx.exe is located is C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin>
pvk2pfx.exe is not related to Microsoft .NET (2.0) SDK but to C/C++ SDK so look fo in c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ directory.
You need to install Windows SDK https://developer.microsoft.com/pl-pl/windows/downloads/windows-sdk/ . When installing please have selected "Windows SDK for Desktop C++ x86 apps" option.
Then the pvk2pfx.exe file will be located in C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86 .
You can also run the "Developer Powershell for VS 2022" (or the latest equivalent) and it will already know where to look.

Task could not find "AL.exe" using the SdkToolsPath

I have this problem tring to build one solution
Task could not find "AL.exe" using the SdkToolsPath "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed
I know there is a similar question, but the aswer didn't work for me
In the same computer a can build other solutions in Net 4 without any problem, so don't understand
I'm using:
Windows XP Professional SP3
Visual Web Developer 2010 Express
Easiest thing to do is copy al.exe
from
C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\NETFX 4.0 Tools\
(For Windows 10 from
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools)
to
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\
As I got this issue in VS2019 after a fresh install of both Windows and Visual Studio 2019 I thought it might be good to share:
Installing Microsoft.Net.Component.4.7.2.SDK from the Visual Studio installer fixed it for me!
Do you have any resource files in your project? Try to delete all of them and build your project again.
I've got exact the same error and after deleting the resource files (*.hrsx) my build worked again.
Maybe it helps.
I am using VS2019, this way works for me:
Add a system env variable TargetFrameworkSDKToolsDirectory
like this:
TargetFrameworkSDKToolsDirectory=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools

signtool.exe not found in vs2008

I'm trying to publish a program in vs2008 but I get the following error,
can not publish because a project failed to build.
An error occurred while signing: signtool.exe not found.
I've been searching Google for some time now but I can't find the answer.
I can't find signtool.exe; can anyone tell me where I can get it?
signtool.exe is included with the Windows SDK, and a copy of the Windows SDK is included with VS2008.
It should be installed as %ProgramFiles%\Microsoft SDKs\Windows\v6.0A\bin\signtool.exe, but it might depend on installation options.
Another route is to install the Windows SDK directly (latest version includes Win7/2008R2 support).
VS 2008 - This tool is located at,
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
Probably you could find in any one of this location.
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin

Resources