#*************************************************** # # Nullsoft SuperPiMP (NSIS) Script File # Generated by superPiMP wizard # [http://manavmax.tripod.com/] # # (C)2001 Manav Rathi [manavmax@rediffmail.com] # #*************************************************** # todo list # 1-figure out how to test the presence of file in system directory and copy in different dir, maybe a subroutine # called smartDLLinstall. This would try to install over existing system file. If it failed # due to write error, it would then install the file in the programfiles folder. If it failed because # the version was up to date, it would happily exit. # 2-when we put the first exe file in the program folder, we need a way to tell the user that the # system is locked down if this fails, and encourage them to use My documents or c:\temp as the # install folder. # [Installer Attributes] Name "Organizers Database" OutFile "odbinstall.exe" Caption "Organizers Database 0.9.7 Installer" BrandingText " " # [License Attributes] LicenseText "Please read the overview below for this free software, and then click on the 'Next' button." "Next -->" LicenseData "..\Application Directory\readme.txt" # [Additional Installer Settings ] ShowInstDetails show AutoCloseWindow true InstallButtonText "Next -->" subcaption 0 " " subcaption 2 " " subcaption 3 " " MiscButtonText "<-- Back" "Next" "Cancel" "Done" SilentInstall normal CRCCheck on SetCompress auto SetDatablockOptimize on SetOverwrite ifnewer # [Files] Section "default" SetOutPath $INSTDIR File /r "..\Application Directory\*.*" #File /r "..\Application2 Directory\*.*" #SetOutPath $SYSDIR File /r "..\System Directory\Msvbvm50.dll" File /r "..\System Directory\vb5db.dll" File /r "..\System Directory\comctl32.ocx" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organizers Database 0.9" "DisplayName" "Organizers Database (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organizers Database 0.9" "UninstallString" "$INSTDIR\unInst.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organizers Database 0.9" "HelpLink" "http://organizersdb.org" regdll $SYSDIR\comctl32.ocx SectionEnd # [Directory Selection] InstallDir "$PROGRAMFILES\OC" DirShow show DirText "Please click 'Next' to complete the installation, using the standard location on your PC." "Although this is not recommended for most users, you can change this location:" "Change..." # [Shortcuts] Section "CreateShortCut" sleep 900 CreateDirectory "$SMPROGRAMS\Organizers Database" SetOutPath $INSTDIR CreateShortCut "$SMPROGRAMS\Organizers Database\Run ODB.lnk" "$INSTDIR\odb.exe" CreateShortCut "$DESKTOP\Run ODB.lnk" "$INSTDIR\odb.exe" CreateShortCut "$SMPROGRAMS\Organizers Database\ODB User Guide.lnk" "$INSTDIR\ODB User Guide.rtf" WriteUninstaller "$INSTDIR\uninst.exe" CreateShortCut "$SMPROGRAMS\Organizers Database\Uninstall ODB.lnk" "$INSTDIR\uninst.exe" sleep 1200 HideWindow SectionEnd ;called when the install was successful Function .onInstSuccess MessageBox MB_YESNO "Installation was Successfull! An Organizers Database icon has been placed on your desktop, and you may also run (or uninstall) ODB from your Start menu. Would you like to run ODB now?" IDYES NoAbort Abort NoAbort: Exec "$INSTDIR\odb.exe" FunctionEnd ; UninstallCaption "Uninstall ODB" ; UninstallText "This will uninstall ODB" ; ShowUninstDetails hide UninstallText "Please click on the 'Uninstall' button to remove Organizers Database from your system" Section "Uninstall" Delete "$INSTDIR\odb.exe" Delete "$INSTDIR\converters\*.*" delete "$INSTDIR\ODB User Guide.rtf" delete "$INSTDIR\readme.txt" delete "$INSTDIR\odbsetup.dat" delete "$INSTDIR\uninst.exe" Delete "$SMPROGRAMS\Organizers Database\Run ODB.lnk" Delete "$DESKTOP\Run ODB.lnk" Delete "$SMPROGRAMS\Organizers Database\ODB User Guide.lnk" RMDir /r "$SMPROGRAMS\Organizers Database" RMDir /r "$SMPROGRAMS\Organizers' Database" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organizers Database 0.9" ;add/remove menu deletion DeleteRegKey HKCU "Software\VB and VBA Program Settings\Organizers Database\Version0.9" ;remove saved window size settings ;Delete Rest of the Files, and then remove the installation folder if user wants to messagebox MB_YESNO "The program and the shortcuts to it have been removed. Do you want to also completely clean out your ODB program files folder (which may include backup copies of your database, saved queries, templates, zip code files, and import specifications)?" IDNo sectend RMDir /r "$INSTDIR" ; won't fully delete stuff because uninst.exe is still running! sectend: SectionEnd #eof!