; Script generated by the HM NIS Edit Script Wizard. ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "TaskTracker" !define PRODUCT_VERSION "1.0.361" !define PRODUCT_PUBLISHER "Wordwise Solutions" !define PRODUCT_WEB_SITE "http://tasktracker.wordwisesolutions.com" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\TaskTracker.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" !include "UpgradeDLL.nsh" ; MUI Settings !define MUI_ABORTWARNING !define MUI_ICON "tasktracker.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" !define MUI_WELCOMEPAGE_TITLE "TaskTracker™ - Keep Your Files at Your Fingertips™" !define MUI_WELCOMEPAGE_TEXT "Please take this opportunity to be a voluntary sponsor of the ongoing development and improvement of TaskTracker. \r\nYou may make your contribution at http://tasktracker.wordwisesolutions.com/sponsor/. \r\n \r\nThank you and enjoy TaskTracker! \r\n \r\n Michael M. Ross \r\n Wordwise Solutions \r\n \r\n \r\n(Before proceeding, exit TaskTracker if it is running.) \r\nClick Next to Continue." ; Welcome page !insertmacro MUI_PAGE_WELCOME ; License page !insertmacro MUI_PAGE_LICENSE "License.rtf" ; Directory page !insertmacro MUI_PAGE_DIRECTORY ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page !define MUI_FINISHPAGE_RUN "$INSTDIR\TaskTracker.exe" !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Readme.txt" !insertmacro MUI_PAGE_FINISH ; Uninstaller pages !insertmacro MUI_UNPAGE_INSTFILES ; Language files !insertmacro MUI_LANGUAGE "English" ; DLL update if necessary !insertmacro UpgradeDLL "COMCTL32.OCX" "$SYSDIR\COMCTL32.OCX" "$SYSDIR" ; MUI end ------ Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" OutFile "Setup.exe" InstallDir "$PROGRAMFILES\TaskTracker" InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" ShowInstDetails show ShowUnInstDetails show Section "MainSection" SEC01 SetOutPath "$INSTDIR" SetOverwrite try CreateDirectory "$SMPROGRAMS\TaskTracker" CreateShortCut "$SMPROGRAMS\TaskTracker\TaskTracker.lnk" "$INSTDIR\TaskTracker.exe" CreateShortCut "$SMPROGRAMS\TaskTracker\Readme.lnk" "$INSTDIR\Readme.txt" CreateShortCut "$SMPROGRAMS\TaskTracker\License.lnk" "$INSTDIR\License.txt" File "TaskTracker.exe" File "Readme.txt" File "License.txt" File "TaskTracker.exe.manifest" SetOutPath "$SYSDIR" File "COMCTL32.OCX" SectionEnd Section -AdditionalIcons WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" CreateShortCut "$SMPROGRAMS\TaskTracker\TaskTracker Home Page.lnk" "$INSTDIR\${PRODUCT_NAME}.url" SectionEnd Section -Post WriteUninstaller "$INSTDIR\uninst.exe" WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\TaskTracker.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\TaskTracker.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 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 Function .oninit again: FindWindow $0 "ThunderRT6FormDC" "TaskTracker" IsWindow $0 0 done Messagebox MB_OK|MB_ICONSTOP "Please exit TaskTracker before proceeding." Abort done: functionend Section Uninstall Delete "$INSTDIR\${PRODUCT_NAME}.url" Delete "$INSTDIR\uninst.exe" Delete "$INSTDIR\TaskTracker.exe.manifest" Delete "$INSTDIR\License.txt" Delete "$INSTDIR\Readme.txt" Delete "$INSTDIR\TaskTracker.exe" Delete "$SMPROGRAMS\TaskTracker\Website.lnk" Delete "$SMPROGRAMS\TaskTracker\TaskTracker.lnk" RMDir "$SMPROGRAMS\TaskTracker" RMDir "$INSTDIR" DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" SetAutoClose true SectionEnd