Archive: NSIS 2.09 - Fails to write uninstaller/No Details/Uninstall failure


NSIS 2.09 - Fails to write uninstaller/No Details/Uninstall failure
Hello all,

Technically this is three questions, but I didnt want to spam the board.

1) I am using the following lines to write an uninstaller:

Section -FinishSection
WriteRegStr HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAMEANDVERSION}" \
"DisplayName" "${APPNAMEANDVERSION}"
WriteRegStr HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAMEANDVERSION}" \
"UninstallString" "$INSTDIR\uninstall.exe"
WriteUninstaller "$INSTDIR\uninstall.exe"
SectionEnd
;;MessageBox MB_OK $INSTDIR


The $INSTDIR is set with the following lines


!define APPNAMEANDVERSION "MyApp_1.0.2.4_SB_SIAC"
InstallDir "$PROGRAMFILES\${APPNAMEANDVERSION}"


When the installer runs the necessary registry keys are created so the section is being hit, but the unistaller executable is not created. If I enabled the MessageBox line in the finish section this displays a valid path.

Interestingly if I code the unistaller path to be c:\uninstall.exe this works fine and the unistaller is written. Which leads onto question 2.

2) My installer generates and unistall executable in C:\ when I attempt to execute this file I get the following error:

NSIS Error
Error launching installer
I cant find any further information on this error in the operating system logs, google searches show lots of people reporting the error but few solutions. Can anybody point me in the right direction?

3) And the third and final question, for some reason while the installer is working if I click the "Show Details" button it doesnt show any details.

I have played with the ShowInstDetails command, but this seems to enable or disable the option to show details rather than enable/disable the generation of details

And that folks is about it, thanks in advance for any guidance offered on finding a solution to these problems

Are you sure $INSTDIR exists when you call WriteUninstaller?

An uninstaller will not run from a root of a drive, unless AllowRootDirInstall is enabled.

As for the details problem, a complete example is needed. Without it, all I can suggest is that you search for SetDetailsPrint calls.