Signtool Unexpected token 'sign'

Viewed 158

I went through the questions but could not find the exact same issue as what I am encountering.

I installed Signtool following the instructions under Windows 11, and am trying to apply the instructions here: https://docs.microsoft.com/en-us/windows/win32/seccrypto/using-signtool-to-sign-a-file

I simply type :

signtool sign myprog.exe

And I get the below. What gives ? :

At line:1 char:72 ... les (x86)\Windows Kits\10\bin\10.0.22000.0\x64\Signtool" sign ChecksB ... ~~~~ Unexpected token 'sign' in expression or statement. CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException FullyQualifiedErrorId : UnexpectedToken**

1 Answers

The output looks strange, you seem to be in a folder called "Signtool". If you use Powershell you need to use .\ to invoke an application in the current directory, for example:

cd 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86\'

and then

.\signtool.exe sign C:\myprog.exe
Related