Why does signtool in command-prompt return “Windows cannot find 'signtool'. Make sure you typed the name correctly…”

StackOverflow https://stackoverflow.com/questions/10474488

문제

I do have that file. (In "...\Program Files\Microsoft SDKs..."). And I went to installed-programs (in Control Panel) and "reinstalled" it.

So why doesn't the command prompt recognize it?

도움이 되었습니까?

해결책

Because the folder isn't in the system PATH. (From the command prompt, type PATH and hit enter to see what the current PATH contains.)

You can add the folder by adding the folder to the existing PATH from the command prompt (of course, replace the folder with the proper location for the SDK version and location on your system):

set PATH="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin";%PATH%

Signtool should work now from any folder (until you close the command prompt).

You can also create a batch file that sets the PATH properly for you to save typing, if you need it often:

; Save this as something like SDKEnv.bat in a folder on the current PATH
@SET FrameworkDir=C:\Windows\Microsoft.NET\Framework\v2.0.50727
@SET PATH=%FrameworkDir%;%PATH%

Now you can run the batch file just before running SignTool:

SDKEnv
Signtool <parameters>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top