However the uninstaller is not signed, only the installer will be signed. Anyone sees why it's not working?
I commendted out the echo off directive in the scrip in order to see what is going on - besides this is just the standard script.
!insertmacro: _PostExecWriteBatFile
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "SETLOCAL
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "SET Command=%~1
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "IF NOT "%1"=="DELAYED_LOAD" (
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" " :: Run this script again with "DELAYED_LOAD" as the first parameter
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" " :: this lets use break out of the original shell so that makensis will not wait for
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" " :: this script to finish
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" " start "" /D "%~dp0" "%COMSPEC%" /c "%~dpf0" DELAYED_LOAD %1 %2 %3 %4 %5 %6 %7 %8 %9
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" " EXIT /B
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" ")
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "SHIFT
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "SET PROCESS=makensis.exe
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "echo Waiting for %PROCESS% to exit
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "echo %1 %2 %3 %4 %5 %6 %7 %8 %9
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" ":: Get the PID of makensis.exe
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "FOR /F "tokens=2 skip=3" %%i IN (
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" " 'tasklist.exe /FI "USERNAME eq %USERDOMAIN%\%USERNAME%" /FI "IMAGENAME eq %Process%"'
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" ") DO (
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" " CALL :TASKWAIT %PROCESS% %%~i
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" ")
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "%1 %2 %3 %4 %5 %6 %7 %8 %9
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "ENDLOCAL
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "DEL %0.bat
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "EXIT
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" "
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" ":TASKWAIT
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" " ping.exe -n 2 -w 100000 127.0.0.1 >NUL
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" " tasklist.exe /FI "USERNAME eq %USERDOMAIN%\%USERNAME%" /FI "IMAGENAME eq %1" /FI "PID eq %2" 2>NUL | find.exe "%1" >NUL && GOTO %0
"
!appendfile: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" " EXIT /B
"
!insertmacro: end of _PostExecWriteBatFile
!system: "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp signtool sign /f key.p12 /p password /t http://timestamp.comodoca.com/authenticode C:\setup.exe"
C:\OpenMTBMap\mapfolder\mtblegend>SETLOCAL
C:\OpenMTBMap\mapfolder\mtblegend>SET Command=signtool
C:\OpenMTBMap\mapfolder\mtblegend>IF NOT "signtool" == "DELAYED_LOAD" (
start "" /D "C:\Users\OPENMT~1\AppData\Local\Temp\2\" "C:\Windows\system32\cmd.exe" /c "C:\Users\OPENMT~1\AppData\Local\Temp\2\nstC9B4.tmp.bat" DELAYED_LOAD signtool sign /f C:\key.p12 /p password /t http://timestamp.comodoca.com/authenticode C:\setup.exe
EXIT /B
)
The system cannot find the drive specified.
!system: returned 0
!insertmacro: end of _PostExec9
The installer is correctly signed. However after running the installer - the uninstaller is not signed.
Also note at the end of the code the error " The system cannot find the drive specified.".