; Generated NSIS script file (generated by makensitemplate.phtml 0.20) ; by 141.213.34.248 on Jun 12 01 @ 18:31 ; NOTE: this .NSI script is designed for NSIS v1.3+ Name "WriteHere 1.4.0" OutFile "WriteHere_Installer140.exe" ; Some default compiler settings (uncomment and change at will): ; SetCompress auto ; (can be off or force) ; SetDatablockOptimize on ; (can be off) ; CRCCheck on ; (can be off) ; AutoCloseWindow false ; (can be true for the window go away automatically at end) ; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable) ; SetDateSave on ; (can be on to have files restored to their orginal date) SetCompress auto ; (can be off or force) SetDatablockOptimize on ; (can be off) CRCCheck on ; (can be off) AutoCloseWindow false ; (can be true for the window go away automatically at end) SetDateSave on ; (can be on to have files restored to their orginal date) InstType "Full" InstallDir "$DESKTOP\Hi-CE\WriteHere" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Hi-CE\WriteHere" "" DirShow show ; (make this hide to not let the user change it) DirText "Preparing to install WriteHere" Icon WriteHere.ico ComponentText "Select Components to Install" EnabledBitmap Check3.bmp DisabledBitmap Gray3.bmp LicenseText 'You must click "next" to agree to this license before installing.' LicenseData "WriteHere Disclaimer.txt" Section "WriteHere.prc (34 kb)" ;SectionIn 12345678 ; (uncomment and change this to add it to install types) SetOutPath "$INSTDIR" StrCpy $0 "false" SectionEnd ; end of default section SectionDivider ; Section "Spellchecker Database (914 kb) [optional]" SectionIn 1; File "WriteHereSpellDB.pdb" StrCpy $0 "true" SectionEnd ; end of default section Section "Conduit" SectionIn 1; StrCpy $7 "true" SectionEnd ; end of default section Section "" strcpy $4 "WriteHere" File "WriteHere.prc" File "Readme.txt" File "Goto_Hi-CE_Handhelds_web_site.url" File "WriteHere_Quick_Start.pdf" File "Getting_Started.pdf" StrCpy $8 "erHw" ReadRegStr $9 HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\Core" "Path" strcmp $9 "" Bad Good Bad: Abort "Palm Desktop 3.x must be installed before $4 - Aborting Installation" Good: WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Hi-CE\$4" "" "$INSTDIR" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$4" "DisplayName" "Hi-CE: $4 1.4.0 (remove only)" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$4" "UninstallString" '"$INSTDIR\uninst.exe"' strcmp $7 "true" HotSyncChk Complete HotSyncChk: FindWindow goto:HotSyncRunning "KittyHawk" StrCpy $1 "false" Goto PalmRegistry HotSyncRunning: ReadRegStr $6 HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\HotSync Manager" "DontAskExit" StrCpy $1 "true" strcmp $6 "" CloseHotSyncManager CloseDontAsk CloseHotSyncManager: WriteRegDword HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\HotSync Manager" "DontAskExit" 1 StrCpy $6 "true" CloseDontAsk: FindWindow closeinstant "KittyHawk" PalmRegistry: ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Hi-CE\$4" "AppNum" strcmp $2 "" NewInst RegChk NewInst: StrCpy $2 "3" RegChk: ReadRegStr $3 HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\Application$2" "Creator" strcmp $3 "" BgnWrt Strcmp $3 $8 DelConduit ChkDigits DelConduit: DeleteRegKey HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\Application$2" Goto BgnWrt ChkDigits: Strcmp $2 "3" Set4 Set5 Set4: StrCpy $2 "4" Goto RegChk Set5: Strcmp $2 "4" Set5a Set6 Set5a: StrCpy $2 "5" Goto RegChk Set6: Strcmp $2 "5" Set6a Set7 Set6a: StrCpy $2 "6" Goto RegChk Set7: Strcmp $2 "6" Set7a Set8 Set7a: StrCpy $2 "7" Goto RegChk Set8: Strcmp $2 "7" Set8a Set9 Set8a: StrCpy $2 "8" Goto RegChk Set9: Strcmp $2 "8" Set9a Set10 Set9a: StrCpy $2 "9" Goto RegChk Set10: Strcmp $2 "9" Set10a Set11 Set10a: StrCpy $2 "10" Goto RegChk Set11: Strcmp $2 "10" Set11a Set12 Set11a: StrCpy $2 "11" Goto RegChk Set12: Strcmp $2 "11" Set12a Set13 Set12a: StrCpy $2 "12" Goto RegChk Set13: Strcmp $2 "12" Set13a Set14 Set13a: StrCpy $2 "13" Goto RegChk Set14: Strcmp $2 "13" Set14a Set15 Set14a: StrCpy $2 "14" Goto RegChk Set15: Strcmp $2 "14" Set15a Set16 Set15a: StrCpy $2 "15" Goto RegChk Set16: Strcmp $2 "15" Set16a Set17 Set16a: StrCpy $2 "16" Goto RegChk Set17: Strcmp $2 "16" Set17a Set18 Set17a: StrCpy $2 "17" Goto RegChk Set18: Strcmp $2 "17" Set18a Set19 Set18a: StrCpy $2 "18" Goto RegChk Set19: Strcmp $2 "18" Set19a Set20 Set19a: StrCpy $2 "19" Goto RegChk Set20: Strcmp $2 "19" Set20a Set21 Set20a: StrCpy $2 "20" Goto RegChk Set21: Strcmp $2 "20" Set21a Set22 Set21a: StrCpy $2 "21" Goto RegChk Set22: Strcmp $2 "21" Set22a Set23 Set22a: StrCpy $2 "22" Goto RegChk Set23: Strcmp $2 "22" Set23a Set24 Set23a: StrCpy $2 "23" Goto RegChk Set24: Strcmp $2 "23" Set24a Set25 Set24a: StrCpy $2 "24" Goto RegChk Set25: Strcmp $2 "25" SetFinal SetFinal: StrCpy $2 "63" ReadRegStr $3 HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop" "Application$2" ifErrors RegAbort BgnWrt RegAbort: Abort "Too many conduits installed - Aborting installation" BgnWrt: WriteRegStr HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\Application$2" "Conduit" "$4.dll" WriteRegStr HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\Application$2" "Remote0" "$4DB" WriteRegDword HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\Application$2" "Creator" 0x77487265 WriteRegDword HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\Application$2" "Priority" 2 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Hi-CE\$4" "AppNum" $2 ;StrCpy $4 $OUTDIR SetOutPath $9 File "WriteHere.dll" SetOutPath "$INSTDIR\Images" File "Hi-CE_logo.jpeg" File "leftArrow.gif" File "rightArrow.gif" File "upArrow.gif" File "WriteHereLogo.gif" SetOutPath "$INSTDIR\Data" SetOutPath "$INSTDIR" strcmp $1 "true" RestartHotSync Goto Complete RestartHotSync: strcmp $6 "true" ResetKey JmpEnd ResetKey: WriteRegDword HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\HotSync Manager" "DontAskExit" 0 JmpEnd: ClearErrors ExecShell "open" "$9\HotSync.exe" SW_SHOWNORMAL ifErrors HotSyncErr0 Complete HotSyncErr0: Call HotSyncFailedMsg Complete: MessageBox MB_YESNO|MB_ICONQUESTION|MB_TOPMOST \ "View README file?" \ IDNO SkipReadme ExecShell "open" "$OUTDIR\Readme.txt" SW_SHOWNORMAL SkipReadme: MessageBox MB_YESNO|MB_ICONQUESTION \ "Would you like to view the Getting Started Page?$\n$\n(Requires Adobe Acrobat Reader)" \ IDNO SkipQSe ExecShell "open" "$OUTDIR\Getting_Started.pdf" SW_SHOWNORMAL SkipQSe: MessageBox MB_YESNO|MB_ICONQUESTION \ "Would you like to view the Quick Start Guide?$\n$\n(Requires Adobe Acrobat Reader)" \ IDNO SkipQS ExecShell "open" "$OUTDIR\$4_Quick_Start.pdf" SW_SHOWNORMAL SkipQS: HideWindow strcmp $0 "true" Both One One: ClearErrors Exec "$9\Instapp.exe $OUTDIR\$4.prc" ifErrors InstAppErr0 Done InstAppErr0: Call InstAppFailedMsg Goto Done Both: ClearErrors Exec "$9\Instapp.exe $OUTDIR\$4.prc $OUTDIR\$4SpellDB.pdb" ifErrors InstAppErr1 Done InstAppErr1: Call InstAppFailedMsg Done: SectionEnd ; end of default section ; begin uninstall settings/section UninstallText "This will uninstall WriteHere 1.4.0 from your system" UninstallExeName "uninst.exe" Section Uninstall ; add delete commands to delete whatever files/registry keys/etc you installed here. strcpy $4 "WriteHere" ReadRegStr $9 HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\Core" "Path" ReadRegStr $6 HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\HotSync Manager" "DontAskExit" FindWindow goto:UnHotSyncRunning "KittyHawk" StrCpy $1 "false" Goto UnReg UnHotSyncRunning: StrCpy $1 "true" strcmp $6 "" UnCloseHotSyncManager UnDontAsk UnCloseHotSyncManager: WriteRegDword HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\HotSync Manager" "DontAskExit" 1 StrCpy $6 "true" UnDontAsk: FindWindow closeinstant "KittyHawk" UnReg: ReadRegStr $5 HKEY_LOCAL_MACHINE "SOFTWARE\Hi-CE\$4" "AppNum" strcmp $5 "" DelNoConduit DelConduit DelConduit: DeleteRegKey HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\Application$5" DelNoConduit: Delete "$INSTDIR\uninst.exe" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Hi-CE\$4" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$4" strcmp $1 "true" UnRestartHotSync Goto UnComplete UnRestartHotSync: strcmp $6 "true" UnResetKey UnJmpEnd UnResetKey: WriteRegDword HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\HotSync Manager" "DontAskExit" 0 UnJmpEnd: ClearErrors ExecShell "open" "$9\HotSync.exe" SW_SHOWNORMAL ifErrors HotSyncErr0 UnComplete HotSyncErr0: MessageBox MB_OK|MB_ICONEXCLAMATION "HotSync Manager failed to reload.$\nPlease restart HotSync Manager before using this program." UnComplete: Delete /REBOOTOK "$INSTDIR\$4.prc" Delete /REBOOTOK "$INSTDIR\Readme.txt" Delete /REBOOTOK "$INSTDIR\Goto_Hi-CE_Handhelds_web_site.url" Delete /REBOOTOK "$INSTDIR\$4_Quick_Start.pdf" Delete /REBOOTOK "$INSTDIR\Getting_Started.pdf" Delete /REBOOTOK "$INSTDIR\$4SpellDB.pdb" strcmp $5 "" DelData Delete /REBOOTOK "$9\WriteHere.dll" DelData: ClearErrors RMDir "$INSTDIR\Data" ifErrors Finished SetFileAttributes "$INSTDIR\Images\" NORMAL Delete /REBOOTOK "$INSTDIR\Images\Hi-CE_logo.jpeg" Delete /REBOOTOK "$INSTDIR\Images\leftArrow.gif" Delete /REBOOTOK "$INSTDIR\Images\rightArrow.gif" Delete /REBOOTOK "$INSTDIR\Images\upArrow.gif" Delete /REBOOTOK "$INSTDIR\Images\$4Logo.gif" Delete /REBOOTOK "$INSTDIR\View your WriteHere docs.html" GetParentDir $4 $INSTDIR SetOutPath "C:\" RMDir "$INSTDIR\Images" RMDir "$INSTDIR" RMDir "$4" Finished: SetFileAttributes "$INSTDIR\Images\" HIDDEN SectionEnd ; end of uninstall section Function .onInit strcpy $4 "WriteHere" ReadRegStr $9 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$4" "UninstallString" strcmp $9 "" Clean PrevInst Clean: goto InitDone PrevInst: ReadRegStr $8 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$4" "DisplayName" MessageBox MB_YESNO "$8 found$\nUninstall this version?" IDNO InitDone ExecShell "open" "$9" SW_SHOWNORMAL ;Abort ; causes installer to quit. IfErrors InstErr InitDone InstErr: Call FailedUninst InitDone: FunctionEnd Function .onInstSuccess SetFileAttributes "$INSTDIR\Images\" HIDDEN MessageBox MB_OK "This version of WriteHere has the ability to use the Infrared Port for Printing WriteHere Documents! $\nVisit http://www.handheld.hice-dev.org/writehereAppPage.htm for a trial version of Bachmann's PrintBoy Software." FunctionEnd Function HotSyncFailedMsg ReadRegStr $9 HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\Core" "Path" ClearErrors Sleep 500 Exec "$9\HotSync.exe" IfErrors DisplayMsgBox Fin DisplayMsgBox: MessageBox MB_OK|MB_ICONEXCLAMATION "HotSync Manager failed to reload.$\nPlease restart HotSync Manager before using this program." Fin: FunctionEnd Function FailedUninst ReadRegStr $9 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$4" "UninstallString" ClearErrors Sleep 500 Exec "$9" IfErrors DisplayMsgBox Fin DisplayMsgBox: MessageBox MB_YESNO|MB_ICONSTOP "Uninstaller failed to load, please uninstall before continuing$\n$\n Abort installation?" IDNO Fin Abort Fin: FunctionEnd Function InstAppFailedMsg ReadRegStr $9 HKEY_CURRENT_USER "Software\U.S. Robotics\Pilot Desktop\Core" "Path" ClearErrors Sleep 500 StrCpy $4 "WriteHere" Exec "$9\Instapp.exe $OUTDIR\$4.prc" IfErrors DisplayMsgBox Fin DisplayMsgBox: MessageBox MB_OK|MB_ICONEXCLAMATION "InstApp failed to load.$\nPlease double-click on the .prc and .pdb files in:$\n$\n$INSTDIR." Fin: FunctionEnd ; eof