Hello,
i am trying to run third party executable to sing my app.
I have been hitting the wall all morning. it seems that Powershell does not like .exe :)
SO in general i am trying to run following command:
&"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f "C:\SSL\ssl.pfx" /p 'password' /t 'http://timestamp.comodoca.com/authenticode'
It returns :
signtool.exe : SignTool Error: Missing filename.
Then i put path to executable path in variable like
$path = "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\"
and then run
&"$path\signtool.exe" sign /f "C:\SSL\ssl.pfx" /p 'password' /t 'http://timestamp.comodoca.com/authenticode'
and i got
The term '$path\signtool.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
I have tried to break down the string URL to different args, rynning echoarg.exe
& C:\Installers\EchoArgs.exe sign /f 'C:\SSL\ssl.pfx' /p 1gS0FtSsL /t 'http://timestamp.comodoca.com/authenticode'
and i got:
Arg 0 is <sign>
Arg 1 is </f>
Arg 2 is <C:\SSL\ssl.pfx>
Arg 3 is </p>
Arg 4 is <password>
Arg 5 is </t>
Arg 6 is <http://timestamp.comodoca.com/authenticode>
Then i have tried to workaround like :
param (
[string]$arg1 = "sign",
[string]$arg2 = "/f",
[string]$pfx = "C:\SSL\ssl.pfx",
[string]$arg4 = "/p",
[string]$pass = "password",
[string]$arg5 = "/t",
[string]$url = "http://timestamp.comodoca.com/authenticode"
)
$path = "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\"
[System.Diagnostics.Process]::Start "$path\signtool.exe" ($arg1 $arg2 $pfx $arg4 $pass $arg5 $url)
And i got:
Unexpected token '$exe\signtool.exe' in expression or statement.
I will be very thankful if someone give me a hint here.