; Script generated by the HM NIS Edit Script Wizard. ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "KreditMap DB" !define PRODUCT_VERSION "1.0" !define PRODUCT_PUBLISHER "KreditInform" !define PRODUCT_WEB_SITE "http://www.KreditInform.co.za" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Kredit Map DB.exe" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_ROOT_KEY "HKLM" ; MUI 1.67 compatible ------ !include "MUI.nsh" ;Library install/register !include Library.nsh ; MUI Settings !define MUI_ABORTWARNING ;!define MUI_ICON "..\Earth.ico" !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico" ; Welcome page !insertmacro MUI_PAGE_WELCOME ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page !define MUI_FINISHPAGE_RUN "$INSTDIR\Kredit Map DB.exe" !insertmacro MUI_PAGE_FINISH ; Uninstaller pages !insertmacro MUI_UNPAGE_INSTFILES ; Language files !insertmacro MUI_LANGUAGE "English" ; MUI end ------ Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" OutFile "KMDBSetup.exe" InstallDir "$PROGRAMFILES\KreditInform\KMDB" InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" ShowInstDetails show ShowUnInstDetails show Var ALREADY_INSTALLED Section "-Install VB6 runtimes" IfFileExists "$INSTDIR\Kredit Map DB.exe" 0 new_installation StrCpy $ALREADY_INSTALLED 1 new_installation: ; InstallLib libtype shared install localfile destfile tempbasedir !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED "c:\winnt\system32\msvbvm60.dll" "$SYSDIR\msvbvm60.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\olepro32.dll" "$SYSDIR\olepro32.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\comcat.dll" "$SYSDIR\comcat.dll" "$SYSDIR" !insertmacro InstallLib DLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\asycfilt.dll" "$SYSDIR\asycfilt.dll" "$SYSDIR" !insertmacro InstallLib TLB $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\stdole2.tlb" "$SYSDIR\stdole2.tlb" "$SYSDIR" SectionEnd Section "-VB Components" SEC02 !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\COMDLG32.OCX" "$SYSDIR\COMDLG32.OCX" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\MSCOMCT2.OCX" "$SYSDIR\MSCOMCT2.OCX" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\MSSTDFMT.DLL" "$SYSDIR\MSSTDFMT.DLL" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\MSADODC.OCX" "$SYSDIR\MSADODC.OCX" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\tdbgpp7.dll" "$SYSDIR\tdbgpp7.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\todgub7.dll" "$SYSDIR\todgub7.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\todg7.ocx" "$SYSDIR\todg7.ocx" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\MSCOMCTL.OCX" "$SYSDIR\MSCOMCTL.OCX" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\DBLIST32.OCX" "$SYSDIR\DBLIST32.OCX" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\msvcrt.dll" "$SYSDIR\msvcrt.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\scrrun.dll" "$SYSDIR\scrrun.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\MSBIND.DLL" "$SYSDIR\MSBIND.DLL" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\VB5DB.DLL" "$SYSDIR\VB5DB.DLL" "$SYSDIR" ; !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\msjtes40.dll" "$SYSDIR\msjtes40.dll" "$SYSDIR" ; !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\msrepl40.dll" "$SYSDIR\msrepl40.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\msrd3x40.dll" "$SYSDIR\msrd3x40.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\msrd2x40.dll" "$SYSDIR\msrd2x40.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\mswdat10.dll" "$SYSDIR\mswdat10.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\mswstr10.dll" "$SYSDIR\mswstr10.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\expsrv.dll" "$SYSDIR\expsrv.dll" "$SYSDIR" ; !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\vbajet32.dll" "$SYSDIR\vbajet32.dll" "$SYSDIR" !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "c:\winnt\system32\msjint40.dll" "$SYSDIR\msjint40.dll" "$SYSDIR" SectionEnd Section "Microsoft Data Access Components" SEC021 CreateDirectory $INSTDIR\mdac SetOutPath "$INSTDIR\Mdac" ;-- Copy file File "F:\James Laker\Install\MDAC Setups\2.7\mdac_typ_2_7.exe" ;-- Notify User of mdac installation MessageBox MB_OK "The KreditMap DB program requires some components to be installed. Please follow the simple install process to complete the Installation process!" ;-- Install and wait for it to finish ExecWait $INSTDIR\mdac\mdac_typ_2_7.exe SectionEnd Section "MainSection" SEC03 SetOutPath "$INSTDIR" File "..\Kredit Map DB.exe" CreateDirectory "$SMPROGRAMS\KreditMap DB" CreateShortCut "$SMPROGRAMS\KreditMap DB\KreditMap DB.lnk" "$INSTDIR\Kredit Map DB.exe" CreateShortCut "$DESKTOP\KreditMap DB.lnk" "$INSTDIR\Kredit Map DB.exe" SectionEnd Section -AdditionalIcons CreateShortCut "$SMPROGRAMS\KreditMap DB\Uninstall.lnk" "$INSTDIR\uninst.exe" SectionEnd Section -Post WriteUninstaller "$INSTDIR\uninst.exe" WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\Kredit Map DB.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Kredit Map DB.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" SectionEnd Function .onInstSuccess ;Function onGUIEnd FunctionEnd Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." FunctionEnd Function un.onInit MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 Abort FunctionEnd Section Uninstall Delete "$INSTDIR\uninst.exe" Delete "$INSTDIR\mdac\mdac_typ_2_7.exe" Delete "$INSTDIR\Kredit Map DB.exe" Delete "$SMPROGRAMS\KreditMap DB\Uninstall.lnk" Delete "$DESKTOP\KreditMap DB.lnk" Delete "$SMPROGRAMS\KreditMap DB\KreditMap DB.lnk" RMDir "$SMPROGRAMS\KreditMap DB" RMDir "$INSTDIR\mdac" RMDir "$INSTDIR" DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" SetAutoClose true SectionEnd