Archive: Please Help


Please Help
Dear All

I'm new with NSIS. I have a small problem with Icons. I can NOT get any icon to my instalation. I try with all dfiferent icons size. Also if you see any other problem in my script please tell me! All my script is:


; Define your application name
!define APPNAME "TouchFinL"
!define APPNAMEANDVERSION "TouchFinL V4.23"

; Main Install settings
Name "${APPNAMEANDVERSION}"
InstallDir "$PROGRAMFILES\TouchFinL"
InstallDirRegKey HKLM "Software\${APPNAME}" ""
Icon "C:\XXXInstall\tf.io"
OutFile "C:\XXXInstall\Try\TouchFin.exe"

; Modern interface settings
!include "MUI.nsh"

!define MUI_ABORTWARNING
!define MUI_FINISHPAGE_RUN "$INSTDIR\TouchFinL.exe"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "..\license.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

; Set languages (first is default language)
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_RESERVEFILE_LANGDLL

!include Library.nsh

Var ALREADY_INSTALLED


Section "-Install VB6 runtimes"

;Add code here that sets $ALREADY_INSTALLED to a non-zero value if the application is already installed. For example:

IfFileExists "$INSTDIR\TouchFinL.exe" 0 new_installation ;Replace MyApp.exe with your application filename
StrCpy $ALREADY_INSTALLED 1
new_installation:

!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED "..\msvbvm60.dll" "$SYSDIR\msvbvm60.dll" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "..\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "..\olepro32.dll" "$SYSDIR\olepro32.dll" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "..\comcat.dll" "$SYSDIR\comcat.dll" "$SYSDIR"
!insertmacro InstallLib DLL $ALREADY_INSTALLED REBOOT_PROTECTED "..\asycfilt.dll" "$SYSDIR\asycfilt.dll" "$SYSDIR"
!insertmacro InstallLib TLB $ALREADY_INSTALLED REBOOT_PROTECTED "..\stdole2.tlb" "$SYSDIR\stdole2.tlb" "$SYSDIR"

!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "..\MSBIND.DLL" "$SYSDIR\MSBIND.DLL" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "..\MSCOMCT2.OCX" "$SYSDIR\MSCOMCT2.OCX" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "..\MSCOMCTL.OCX" "$SYSDIR\MSCOMCTL.OCX" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "..\MSDATGRD.OCX" "$SYSDIR\MSDATGRD.OCX" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "..\msstdfmt.dll" "$SYSDIR\msstdfmt.dll" "$SYSDIR"

SectionEnd

Section "-un.Uninstall VB6 runtimes"

!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\msvbvm60.dll"
!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\oleaut32.dll"
!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\olepro32.dll"
!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\comcat32.dll"
!insertmacro UnInstallLib DLL SHARED NOREMOVE "$SYSDIR\asycfilt.dll"
!insertmacro UnInstallLib TLB SHARED NOREMOVE "$SYSDIR\stdole2.tlb"

SectionEnd

Section "TouchFinL" Section1

; Set Section properties
SetOverwrite on

; Set Section Files and Shortcuts
SetOutPath "$INSTDIR\"
File "..\MyPrintTFL.dll" ;Reg OK AppPath Folder
RegDLL $INSTDIR\MyPrintTFL.dll
File "..\MDAC_TYP.EXE" ;Reg NE AppPath Folder
File "..\repHTML.tfz" ;Reg NE AppPath Folder
File "..\repPic.tfz" ;Reg NE AppPath Folder
File "..\TFDB.tfb" ;Reg NE AppPath Folder
File "..\TouchFinL.exe" ;Reg NE AppPath Folder
File "..\VB6STKIT.DLL" ;Reg NE System Folder
File "..\wininet.dll" ;Reg NE AppPath Folder

CreateShortCut "$DESKTOP\TouchFinL.lnk" "$INSTDIR\TouchFinL.exe"
CreateDirectory "$SMPROGRAMS\TouchFinL"
CreateShortCut "$SMPROGRAMS\TouchFinL\TouchFinL.lnk" "$INSTDIR\TouchFinL.exe"

SectionEnd

Section -FinishSection

WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\uninstall.exe"
WriteUninstaller "$INSTDIR\uninstall.exe"

SectionEnd

; Modern install component descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} ""
!insertmacro MUI_FUNCTION_DESCRIPTION_END

;Uninstall section

UninstallText "This will uninstall TouchFin. Hit next to continue."
;UninstallIcon "C:\XXXInstall\Tf32.ico"

Section Uninstall
;Remove from registry...
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
DeleteRegKey HKLM "SOFTWARE\${APPNAME}"
; Delete self
Delete "$INSTDIR\uninstall.exe"
; Delete Shortcuts
Delete "$DESKTOP\TouchFinL.lnk"
Delete "$SMPROGRAMS\TouchFinL\TouchFinL.lnk"
Delete "$SMPROGRAMS\TouchFinL\Uninstall.lnk"
; Clean up TouchFinL
Delete "$INSTDIR\MDAC_TYP.EXE"
Delete "$INSTDIR\MyPrintTFL.dll"
Delete "$INSTDIR\TFDB.tfb"
Delete "$INSTDIR\TouchFinL.exe"
Delete "$INSTDIR\wininet.dll"
; Remove remaining directories
RMDir "$SMPROGRAMS\TouchFinL"
RMDir "$INSTDIR\"

SectionEnd


Use !define MUI_ICON and !define MUI_UNICON to set icons for installer and uninstaller (instead Icon and UnInstallIcon).

Add:
Are you sure - extension of your installer icon is .io?


Thank You. The extention is .ico.