I'm trying to follow the instructions for signing an uninstaller located here: Signing an Uninstaller
I've changed the line in the script that uses SIGNCODE to use signtool instead:
!system: ""signtool" "sign /v /f MySPC.pfx /n 'My Company' /d 'My Program Uninstaller' /du http://www.mycompany.com /t http://timestamp.verisign.com/scripts/timstamp.dll $%TEMP%\uninstaller.exe"
I receive an error here:
"SignTool Error: Invalid command: sign /v /f MySPC.pfx /n 'My Company' /d 'My Program Uninstaller' /du http://www.mycompany.com /t http://timestamp.verisign.com/scripts/timstamp.dll C:\Users\me\AppData\Local\Temp\uninstaller.exe
Has anyone done this successfully?
Running signtool from script
6 posts
It would help if you posted the line with !system and not just its output but my guess is that your quotes are wrong, the parameters are sign /v ... and not "sign /v ...". You should double-quote filenames like $%TEMP%\uninstaller.exe but not the entire thing...
Um...I did post the line with !system. It's directly above the line with the output. As you can see, I put the entire I put the entire string in double quotes; the name of the tool, in this case signtool, also in double quotes; the command line to signtool also in double quotes; and the command line parameters that included spaces in single quotes. I did not, however, put the path to the uninstaller.exe in quotes as I thought they would not be necessary for a path with no spaces. I did attempt to use escaped double quotes around the elements with spaces ($\") but the spaces caused errors when I did that:
SignTool Error: Invalid command: sign /v /f MySPC.pfx /n "My
I am unable to try your suggestion of quoting the path right now because now makensis is crashing with error -1073741819 (whatever that means). Here's the context:
Inner invocation (My Program.nsi:93)
OutFile: "C:\Users\me\AppData\Local\Temp\tempinstaller.exe"
SetCompress: off
!system: returned -1073741819, aborting
Error in script "..\BuildInstall\My Program.nsi" on line 103 -- aborting creation process
Anyway, that should probably be another post if I can't find the answer elsewhere. Thanks for the attention.
SignTool Error: Invalid command: sign /v /f MySPC.pfx /n "My
I am unable to try your suggestion of quoting the path right now because now makensis is crashing with error -1073741819 (whatever that means). Here's the context:
Inner invocation (My Program.nsi:93)
OutFile: "C:\Users\me\AppData\Local\Temp\tempinstaller.exe"
SetCompress: off
!system: returned -1073741819, aborting
Error in script "..\BuildInstall\My Program.nsi" on line 103 -- aborting creation process
Anyway, that should probably be another post if I can't find the answer elsewhere. Thanks for the attention.
No you did not, try searching this page for "!system ". The line with "!system:" does not compile even after removing the colon so I had to conclude that it came from compiler output and not your .nsi but I guess I could have been more clear about wanting the line from your .nsi and not just compiler output.Originally Posted by dam101 View PostUm...I did post the line with !system. It's directly above the line with the output.
Anyway, all I can tell you is how to use !system:
The basic syntax is:
!system '"c:\path\to\app.exe" param1 "pa ra m2" param3'so basically !system takes a single string parameter and the outer set of quotes will be removed by the compiler like it does with all strings.
For you it should probably be:
!system '"signtool" sign /v /f MySPC.pfx /n "My Company" /d "My Program Uninstaller" /du http://www.mycompany.com /t http://timestamp.verisign.com/scripts/timstamp.dll "$%TEMP%\uninstaller.exe"' = 0 ; Hoping signtool is in %path%
My apologies, you were correct. That was the compiler output, copied from the command window. Your suggestion worked! Not only was the signtool command run successfully but the crash that appeared has gone away. Thank you for your help. The rules for quoting when using the !system command are now much clearer.
It was probably not a crash. Certainly not a crash in our compiler, possibly a crash in signtool but it is most likely the exit code of the signtool process...Originally Posted by dam101 View PostYour suggestion worked! Not only was the signtool command run successfully but the crash that appeared has gone away.