Heacer Image not displayed, Startmenu entires not removed
I have the following script. The problem is the header image is not displayed and the startmenu entries are not removed after unistallation.
; BT4Dsign Demo installer
;
; This script is based on example2.nsi
;--------------------------------
;Include Modern UI
!include "MUI.nsh"
; The name of the installer
Name "BT4Dsign Demo"
; The file to write
OutFile "InstallBT4DsignDemo.exe"
; The default installation directory
InstallDir $PROGRAMFILES\BT4Dsign_Demo
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\BT4DsignDemo" "Install_Dir"
;--------------------------------
!define MUI_ICON "BTIcon.ico"
!define MUI_UNICON "BTIcon.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "Image_Installer.bmp"
!define MUI_HEADERIMAGE_UNBITMAP "Image_Installer.bmp"
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_LICENSE "DemoLicense.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
; The stuff to install
Section "BT4Dsign Demo" demo
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File /r "bin"
File /r "lib"
File /r "jre"
File /r "profiledb"
File "BTIcon.ico"
File "Image_Installer.bmp"
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\BT4DsignDemo "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BT4DsignDemo" "DisplayName" "BT4Dsign Demo"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BT4DsignDemo" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BT4DsignDemo" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BT4DsignDemo" "NoRepair" 1
WriteUninstaller "uninstall.exe"
WriteRegStr HKCR ".btp" "" "BT.Project"
WriteRegStr HKCR "BT.Project" "" "BT Project File"
WriteRegStr HKCR "BT.Project\DefaultIcon" "" "$INSTDIR\BTIcon.ico"
ReadRegStr $R0 HKCR "BT.Project\shell\open\command" ""
WriteRegStr HKCR "BT.Project\shell" "" "open"
WriteRegStr HKCR "BT.Project\shell\open\command" "" '$INSTDIR\jre\bin\javaw.exe -jar "$INSTDIR\bin\BT4Dsign.jar" -f "%1"'
;System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
SectionEnd
; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts" shortcuts
SetOutPath $INSTDIR\bin
CreateDirectory "$SMPROGRAMS\BT4Dsign\Demo"
CreateShortCut "$SMPROGRAMS\BT4Dsign\Demo\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\BT4Dsign\Demo\BT4Dsign.lnk" "$INSTDIR\bin\BT4Dsign.exe" "" "$INSTDIR\bin\BT4Dsign.exe" 0
CreateShortCut "$SMPROGRAMS\BT4Dsign\Demo\BT4Dsign_de.lnk" "$INSTDIR\bin\BT4Dsign_de.exe" "" "$INSTDIR\bin\BT4Dsign_de.exe" 0
CreateShortCut "$SMPROGRAMS\BT4Dsign\Demo\BT4Dsign_en.lnk" "$INSTDIR\bin\BT4Dsign_en.exe" "" "$INSTDIR\bin\BT4Dsign_en.exe" 0
SectionEnd
;--------------------------------
;Descriptions
;Language strings
LangString DESC_Demo ${LANG_ENGLISH} "Installes the BT4Dsign demo."
LangString DESC_shortcuts ${LANG_ENGLISH} "Installes shortcuts for BT4Dsign demo."
;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Demo} $(DESC_Demo)
!insertmacro MUI_DESCRIPTION_TEXT ${shortcuts} $(DESC_shortcuts)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove directories used
Delete "$SMPROGRAMS\BT4Dsign\Demo\BT4Dsign.ink"
Delete "$SMPROGRAMS\BT4Dsign\Demo\Uninstall.ink"
RMDir /r "$SMPROGRAMS\BT4Design"
RMDir /r "$INSTDIR"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BT4DsignDemo"
DeleteRegKey HKLM SOFTWARE\BT4DsignDemo
DeleteRegKey HKCR ".btp"
DeleteRegKey HKCR "BT.Project"
SectionEnd