;Payroll Database User Interface ;-------------------------------- ; include modern UI component !include "MUI2.nsh" ;-------------------------------- ;General ;Name and file Name "Payroll Database 2008" OutFile "payrolldatabase2008.exe" ;Default installation folder InstallDir "C:\Program Files\Payroll Database 2008" ;Get installation folder from registry if available InstallDirRegKey HKCU "Software\Payroll Database 2008" "" ;Request application privileges for Windows Vista RequestExecutionLevel user ;-------------------------------- ;Variables Var StartMenuFolder ;-------------------------------- ;Interface Settings !define MUI_ABORTWARNING ;-------------------------------- ;Pages !insertmacro MUI_PAGE_WELCOME ; welcome page !insertmacro MUI_PAGE_LICENSE "C:\Payroll Database\Licence.txt" ;licence agreement !insertmacro MUI_PAGE_DIRECTORY ; install directory selection ;Start Menu Folder Page Configuration !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Payroll Database 2008" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_WELCOME !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_FINISH ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" ;-------------------------------- ;Installer Sections Section "INSTALL FILES" ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put file there ;file "C:\Payroll Database\ADODB.dll.deploy" ;file "C:\Payroll Database\Interop.Access.dll.deploy" ;file "C:\Payroll Database\Interop.DAO.dll.deploy" ;file "C:\Payroll Database\Microsoft.Vbe.Interop.dll.deploy" ;file "C:\Payroll Database\office.dll.deploy" ;file "C:\Payroll Database\Payroll Database.exe.config.deploy" ;file "C:\Payroll Database\Payroll Database.exe.deploy" ;file "C:\Payroll Database\Payroll Database.exe.manifest" ;file "C:\Payroll Database\payrollDatabase.mdb.deploy" ;file "C:\Payroll Database\Payroll Database_1_0_0_0.application\ADODB.dll.deploy" ;file "C:\Payroll Database\Payroll Database_1_0_0_0.application\Interop.access.dll.deploy" ;file "C:\Payroll Database\Payroll Database_1_0_0_0.application\interop.DAO.dll.deploy" ;file "C:\Payroll Database\Payroll Database_1_0_0_0.application\Microsoft.vbe.Interop.dll.deploy" ;file "C:\Payroll Database\Payroll Database_1_0_0_0.application\office.dll.deploy" ;file "C:\Payroll Database\Payroll Database_1_0_0_0.application\payroll database.exe.config.deploy" ;file "C:\Payroll Database\Payroll Database_1_0_0_0.application\payroll database.exe.manifest" ;file "C:\Payroll Database\Payroll Database_1_0_0_0.application\payrolldatabase.mdb.deploy" file "C:\Payroll Database\setup.exe" file "c:\payroll database\readme.txt" file "C:\Payroll Database\autorun.inf" ;file "C:\Payroll Database\Payroll Database.application" ;file "c:\payroll database\payroll database.application" file "c:\payroll database\payroll database_1_0_0_0.application" ;Store installation folder WriteRegStr HKCU "Software\Payroll Database 2008" "" $INSTDIR ;Create uninstaller WriteUninstaller "$INSTDIR\Uninstall.exe" !insertmacro MUI_STARTMENU_WRITE_BEGIN Application ;Create shortcuts CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" !insertmacro MUI_STARTMENU_WRITE_END SectionEnd ;-------------------------------- ;Uninstaller Section Section "Uninstall" ; uninstall all installed files Delete $INSTDIR\Uninst.exe ; Delete $INSTDIR\uninstall.exe Delete $INSTDIR\readme.txt Delete $INSTDIR\autorun.inf Delete $INSTDIR\setup.exe RMDir $INSTDIR RMDir "$INSTDIR" !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" RMDir "$SMPROGRAMS\$StartMenuFolder" DeleteRegKey /ifempty HKCU "Software\Payroll Database 2008" SectionEnd