|
|
#1 |
|
Junior Member
Join Date: Nov 2015
Posts: 3
|
Running signtool from script
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? |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
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...
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Nov 2015
Posts: 3
|
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. |
|
|
|
|
|
#4 | |||
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
Quote:
Anyway, all I can tell you is how to use !system: The basic syntax is: Quote:
For you it should probably be: Quote:
IntOp $PostCount $PostCount + 1 |
|||
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Nov 2015
Posts: 3
|
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.
|
|
|
|
|
|
#6 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
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...
IntOp $PostCount $PostCount + 1 |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|