#*************************************************** # # 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 "odbinstall1.exe" Caption "Organizers Database 1.0RC1 Preview Installer" BrandingText " " # [License Attributes] LicenseText "Please read the overview below for this free software, and then click on the 'Next' button." "Next -->" LicenseData "..\Application1 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 "..\Application1 Directory\*.*" File /r "..\System Directory\Msvbvm50.dll" File /r "..\System Directory\vb5db.dll" File /r "..\System Directory\mscomctl.ocx" ;File /r "..\System Directory\msxml3.dll" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organizers Database 1.0" "DisplayName" "Organizers Database (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organizers Database 1.0" "UninstallString" "$INSTDIR\unInst.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organizers Database 1.0" "HelpLink" "http://organizersdb.org" regdll $SYSDIR\mscomctl.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 Strcmp $INSTDIR "c:\program files\oc" DefaultPath CreateShortCut "$SMPROGRAMS\Organizers Database\Run ODB in Custom Location.lnk" "$INSTDIR\odb.exe" CreateShortCut "$DESKTOP\Run ODB in Custom Location.lnk" "$INSTDIR\odb.exe" Goto FinishShortCut DefaultPath: Delete "$SMPROGRAMS\Organizers Database\Run ODB.lnk" CreateShortCut "$SMPROGRAMS\Organizers Database\Run ODB 1.0.lnk" "$INSTDIR\odb.exe" Delete "$DESKTOP\Run ODB 1.0.lnk" CreateShortCut "$DESKTOP\Run ODB 1.0.lnk" "$INSTDIR\odb.exe" FinishShortCut: 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 Successful! 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 # [Uninstaller] UninstallText "Please click on the 'Uninstall' button to remove the Organizers Database program files from your system" Section "Uninstall" ;Delete Rest of the Files, and then remove the installation folder if user wants to messagebox MB_YESNO "If you merely want to upgrade to a new version, do not run this uninstaller! Are you sure you want to continue?" IDNo sectend Delete "$INSTDIR\odb.exe" Delete "$INSTDIR\converters\*.*" delete "$INSTDIR\ODB User Guide.rtf" delete "$INSTDIR\readme.txt" delete "$INSTDIR\leer.txt" delete "$INSTDIR\sampledb.original" delete "$INSTDIR\copyleft.txt" delete "$INSTDIR\odbsetup.dat" delete "$INSTDIR\uninst.exe" delete "$INSTDIR\restart.exe" delete "$INSTDIR\testconnection.exe" delete "$INSTDIR\rptview.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 1.0" ;add/remove menu deletion DeleteRegKey HKCU "Software\VB and VBA Program Settings\Organizers Database\Version1.0" ;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 shortcuts to it have been removed. Backup data and saved queries or import specifications in your program files folder can also be removed. Are you sure you want to do this?" IDNo sectend RMDir /r "$INSTDIR" ; won't fully delete stuff because uninst.exe is still running sectend: SectionEnd #eof!