;Compile using http://nsis.sf.net ;Copyright 2005 Bill Talcott http://www.invisibill.net !include "MUI.nsh" !define MUI_ICON "tb.ico" !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "tb.bmp" !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_FINISHPAGE_TEXT "Your icon has been created. You may need to refresh your Desktop (F5) to see the new icon. The options you selected are available from the icon's context menu by right-clicking." CRCCheck force ShowInstDetails show XPStyle on !insertmacro MUI_LANGUAGE "English" Name "Thunderbird Icon Creator" OutFile "tb_icon.exe" InstallDir "$PROGRAMFILES\Mozilla Thunderbird" ;Get install folder from registry if it exists InstallDirRegKey HKLM "SOFTWARE\Mozilla\Mozilla Thunderbird\bin" "PathToExe" InstallDirRegKey HKLM "SOFTWARE\Mozilla\Mozilla Thunderbird 1.0\bin" "PathToExe" InstallDirRegKey HKLM "SOFTWARE\Mozilla\Mozilla Thunderbird 1.0.1\bin" "PathToExe" InstallDirRegKey HKLM "SOFTWARE\Mozilla\Mozilla Thunderbird 1.0.2\bin" "PathToExe" InstallDirRegKey HKLM "SOFTWARE\Mozilla\Mozilla Thunderbird 1.0.3\bin" "PathToExe" InstallDirRegKey HKLM "SOFTWARE\Mozilla\Mozilla Thunderbird 1.0.4\bin" "PathToExe" InstallDirRegKey HKLM "SOFTWARE\Mozilla\Mozilla Thunderbird 1.0.5\bin" "PathToExe" InstallDirRegKey HKLM "SOFTWARE\Mozilla\Mozilla Thunderbird 1.0.6\bin" "PathToExe" !insertmacro MUI_PAGE_DIRECTORY DirText "Please select the location of your Thunderbird installation. The installer has attempted to read this location from your registry, but the value may be missing or incorrect." !insertmacro MUI_PAGE_COMPONENTS ComponentText "Please select the options you would like to have available through your new icon." !insertmacro MUI_PAGE_INSTFILES Section "-Main Icon" WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}" "" "Mozilla Thunderbird" WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}" "InfoTip" "Displays email and news messages." WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\DefaultIcon" "" "$INSTDIR\thunderbird.exe,0" WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Open\Command" "" '"$INSTDIR\thunderbird.exe"' WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}" "" "Mozilla Thunderbird" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}" "InfoTip" "Displays email and news messages." WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\DefaultIcon" "" "$INSTDIR\thunderbird.exe,0" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Open\Command" "" '"$INSTDIR\thunderbird.exe"' WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{258E78D6-70B6-11D9-AAC8-91EC5E497716}}" "Removal Message" "Mozilla Thunderbird provides email and news reading functionality. It is recommended that you do not remove its shortcut." WriteRegDWORD HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\ShellFolder" "Attributes" "0x00000024" WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\ShellFolder" "HideFolderVerbs" "" WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\ShellFolder" "WantsParseDisplayName" "" WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\ShellFolder" "HideOnDesktopPerUser" "" WriteRegDWORD HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\ShellFolder" "Attributes" "0x00000024" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\ShellFolder" "HideFolderVerbs" "" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\ShellFolder" "WantsParseDisplayName" "" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\ShellFolder" "HideOnDesktopPerUser" "" DetailPrint "Desktop icon created." WriteRegExpandStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\InProcServer32" "" "hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,64,00,6f,00,63,00,76,00,77,00,2e,00,64,00,6c,00,6c,00,00,00" WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\InProcServer32" "ThreadingModel" "Apartment" WriteRegExpandStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\InProcServer32" "" "hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,64,00,6f,00,63,00,76,00,77,00,2e,00,64,00,6c,00,6c,00,00,00" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\InProcServer32" "ThreadingModel" "Apartment" SectionEnd Section "Windows XP Prefetching" Prefetch WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Open\Command" "" '"$INSTDIR\thunderbird.exe" /prefetch:1' WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Open\Command" "" '"$INSTDIR\thunderbird.exe" /prefetch:1' DetailPrint "Shortcut using Windows XP prefetching." SectionEnd Section "Profile Manager" ProfileManager WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Profile Manager" "" "Profile Manager" WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Profile Manager\Command" "" '"$INSTDIR\thunderbird.exe" -p' WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Profile Manager" "" "Profile Manager" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Profile Manager\Command" "" '"$INSTDIR\thunderbird.exe" -p' DetailPrint "Profile Manager option added." SectionEnd Section "Safe Mode" SafeMode WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Safe Mode" "" "Safe Mode" WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Safe Mode\Command" "" '"$INSTDIR\thunderbird.exe" -safe-mode' WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Safe Mode" "" "Safe Mode" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Safe Mode\Command" "" '"$INSTDIR\thunderbird.exe" -safe-mode' DetailPrint "Safe Mode option added." SectionEnd Section "Thunderbird Homepage" Homepage WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Homepage" "" "Thunderbird Homepage" WriteRegStr HKCR "CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Homepage\Command" "" 'rundll32.exe url.dll,FileProtocolHandler http://www.mozilla.org/products/thunderbird/' WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Homepage" "" "Thunderbird Homepage" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{258E78D6-70B6-11D9-AAC8-91EC5E497716}\Shell\Homepage\Command" "" 'rundll32.exe url.dll,FileProtocolHandler http://www.mozilla.org/products/thunderbird/' DetailPrint "Homepage option added." SectionEnd LangString DESC_Prefetch ${LANG_ENGLISH} "Uses Windows XP prefetching when opening Thunderbird." LangString DESC_ProfileManager ${LANG_ENGLISH} "Opens the Thunderbird Profile Manager." LangString DESC_SafeMode ${LANG_ENGLISH} "Starts Thunderbird in Safe Mode for troubleshooting." LangString DESC_Homepage ${LANG_ENGLISH} "Opens the Thunderbird product homepage." !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${Prefetch} $(DESC_Prefetch) !insertmacro MUI_DESCRIPTION_TEXT ${ProfileManager} $(DESC_ProfileManager) !insertmacro MUI_DESCRIPTION_TEXT ${SafeMode} $(DESC_SafeMode) !insertmacro MUI_DESCRIPTION_TEXT ${Homepage} $(DESC_Homepage) !insertmacro MUI_FUNCTION_DESCRIPTION_END