; Address Bar XP SP3 ; ; Douglas Thrift ; ; $Id$ !define NAME "Address Bar XP SP3" Name "${NAME}" Outfile "addressbar.exe" SetCompressor /SOLID lzma ShowInstDetails show ShowUninstDetails show XPStyle on !define LINK "http://svn.douglasthrift.net/trac/repos/wiki/AddressBarXPSP3" !define UNINST "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" !define MULTIUSER_EXECUTIONLEVEL "Highest" !define MULTIUSER_INSTALLMODE_COMMANDLINE !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "${UNINST}" !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "UninstallString" !define MULTIUSER_INSTALLMODE_INSTDIR "${NAME}" !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${UNINST}" !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "InstallLocation" !define MULTIUSER_MUI !include "MultiUser.nsh" !include "MUI2.nsh" !define MUI_FINISHPAGE_LINK "${NAME}" !define MUI_FINISHPAGE_LINK_LOCATION "${LINK}" !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_UNFINISHPAGE_NOAUTOCLOSE !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "terms.txt" !insertmacro MULTIUSER_PAGE_INSTALLMODE !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_WELCOME !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_FINISH !insertmacro MUI_LANGUAGE "English" Section "${NAME}" SetOutPath "$INSTDIR" File "addressbar.dll" File "install.txt" File "terms.txt" WriteUninstaller "uninst.exe" StrCmp $MultiUser.InstallMode "AllUsers" AllUsers WriteRegStr HKCU "${UNINST}" "DisplayName" "${NAME}" WriteRegStr HKCU "${UNINST}" "UninstallString" "$INSTDIR\uninst.exe" WriteRegStr HKCU "${UNINST}" "InstallLocation" "$INSTDIR" WriteRegStr HKCU "${UNINST}" "Publisher" "${NAME}" WriteRegStr HKCU "${UNINST}" "URLInfoAbout" "${LINK}" WriteRegDWORD HKCU "${UNINST}" "NoModify" 1 WriteRegDWORD HKCU "${UNINST}" "NoRepair" 1 Goto Register AllUsers: WriteRegStr HKLM "${UNINST}" "DisplayName" "${NAME}" WriteRegStr HKLM "${UNINST}" "UninstallString" "$INSTDIR\uninst.exe" WriteRegStr HKLM "${UNINST}" "InstallLocation" "$INSTDIR" WriteRegStr HKLM "${UNINST}" "Publisher" "${NAME}" WriteRegStr HKLM "${UNINST}" "URLInfoAbout" "${LINK}" WriteRegDWORD HKLM "${UNINST}" "NoModify" 1 WriteRegDWORD HKLM "${UNINST}" "NoRepair" 1 Register: ExecWait '"$SYSDIR\regsvr32.exe" /s "$INSTDIR\addressbar.dll"' SectionEnd Section "un.${NAME}" ExecWait '"$SYSDIR\regsvr32.exe" /s /u "$INSTDIR\addressbar.dll"' Delete /REBOOTOK "$INSTDIR\addressbar.dll" Delete /REBOOTOK "$INSTDIR\install.txt" Delete /REBOOTOK "$INSTDIR\terms.txt" Delete /REBOOTOK "$INSTDIR\uninst.exe" RMDir /REBOOTOK "$INSTDIR" StrCmp $MultiUser.InstallMode "AllUsers" AllUsers DeleteRegKey HKCU "${UNINST}" Goto Done AllUsers: DeleteRegKey HKLM "${UNINST}" Done: SectionEnd Function .onInit !insertmacro MULTIUSER_INIT FunctionEnd Function un.onInit !insertmacro MULTIUSER_UNINIT FunctionEnd