!include "MUI.nsh" ;Written by Dean Wilson NAME "IE Addressbar Search - Mailinator Inbox 0.1" OutFile "IE_AB_UKLug_search.exe" ;Folder selection page InstallDir "$PROGRAMFILES" ;-------------------------------- Var PRODUCTNAME Var PRODUCTVERSION !define PRODUCTNAME "IE Addressbar Search - UKLug" !define UNISTPRODNAME "IE Addressbar Search - UKLug" !define PRODUCTVERSION "0.1" ;-------------------------------- ;Modern UI Configuration !insertmacro MUI_PAGE_LICENSE "C:\ieaddressbar\gpl.txt" !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !define MUI_ABORTWARNING !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" ;-------------------------------- ;Data LicenseData "C:\ieaddressbar\gpl.txt" ;-------------------------------- ;Installer Sections Section "uklug_ab_searche" SecCopyUI ;add entry to reg ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WriteRegStr HKCU "Software\Microsoft\Internet Explorer\SearchUrl\uklug" "" "http://www.uklug.com/cgi-bin/gethtmljobs.pl?keywords=%s" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;add to the "Add/Remove Programs" listing for the current user only WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}" "DisplayName" "${PRODUCTNAME}" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}" "UninstallString" "$INSTDIR\IE_AB_UKLug_search_uninstall.exe" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}" "RegOwner" "Dean Wilson" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}" "URLInfoAbout" "www.unixdaemon.net" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}" "DisplayVersion" "${PRODUCTVERSION}" ;mark as remove only WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}" "NoRepair" "1" WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}" "NoModify" "1" ;Create uninstaller WriteUninstaller "$INSTDIR\IE_AB_UKLug_search_uninstall.exe" SectionEnd ;-------------------------------- ;Uninstaller Section Section "Uninstall" Delete "$INSTDIR\IE_AB_UKLug_search_uninstall.exe" ;this removes the key and all leaves. DeleteRegKey HKCU "Software\Microsoft\Internet Explorer\SearchUrl\uklug" DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}" SectionEnd