;Compile using http://nsis.sf.net ;Copyright 2005 Bill Talcott http://www.invisibill.net !include "MUI.nsh" !define MUI_ICON "ff.ico" !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "ff.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 "Firefox Icon Creator" OutFile "ff_icon.exe" InstallDir "$PROGRAMFILES\Mozilla Firefox" ;Get install folder from registry if it exists InstallDirRegKey HKLM "SOFTWARE\Mozilla\Mozilla Firefox\bin" "PathToExe" InstallDirRegKey HKLM "SOFTWARE\Mozilla\Mozilla Firefox 1.0\bin" "PathToExe" !insertmacro MUI_PAGE_DIRECTORY DirText "Please select the location of your Firefox 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 !insertmacro MUI_PAGE_FINISH Section "-Main Icon" WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}" "" "Mozilla Firefox" WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}" "InfoTip" "Finds and displays information and web sites on the Internet." WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\DefaultIcon" "" "$INSTDIR\firefox.exe,0" WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Open\Command" "" '"$INSTDIR\firefox.exe"' WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}" "" "Mozilla Firefox" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}" "InfoTip" "Finds and displays information and web sites on the Internet." WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\DefaultIcon" "" "$INSTDIR\firefox.exe,0" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Open\Command" "" '"$INSTDIR\firefox.exe"' WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}" "Removal Message" "Mozilla Firefox provides web browsing functionality. It is recommended that you do not remove its shortcut." WriteRegDWORD HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\ShellFolder" "Attributes" "0x00000024" WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\ShellFolder" "HideFolderVerbs" "" WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\ShellFolder" "WantsParseDisplayName" "" WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\ShellFolder" "HideOnDesktopPerUser" "" WriteRegDWORD HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\ShellFolder" "Attributes" "0x00000024" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\ShellFolder" "HideFolderVerbs" "" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\ShellFolder" "WantsParseDisplayName" "" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\ShellFolder" "HideOnDesktopPerUser" "" DetailPrint "Desktop icon created." WriteRegExpandStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\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\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\InProcServer32" "ThreadingModel" "Apartment" WriteRegExpandStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\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\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\InProcServer32" "ThreadingModel" "Apartment" SectionEnd Section "Windows XP Prefetching" Prefetch WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Open\Command" "" '"$INSTDIR\firefox.exe" /prefetch:1' WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Open\Command" "" '"$INSTDIR\firefox.exe" /prefetch:1' DetailPrint "Shortcut using Windows XP prefetching." SectionEnd Section "Profile Manager" ProfileManager WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Profile Manager" "" "Profile Manager" WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Profile Manager\Command" "" '"$INSTDIR\firefox.exe" -p' WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Profile Manager" "" "Profile Manager" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Profile Manager\Command" "" '"$INSTDIR\firefox.exe" -p' DetailPrint "Profile Manager option added." SectionEnd Section "Safe Mode" SafeMode WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Safe Mode" "" "Safe Mode" WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Safe Mode\Command" "" '"$INSTDIR\firefox.exe" -safe-mode' WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Safe Mode" "" "Safe Mode" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Safe Mode\Command" "" '"$INSTDIR\firefox.exe" -safe-mode' DetailPrint "Safe Mode option added." SectionEnd Section "Firefox Homepage" Homepage WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Homepage" "" "Firefox Homepage" WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Homepage\Command" "" 'rundll32.exe url.dll,FileProtocolHandler http://www.mozilla.org/products/firefox/' WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Homepage" "" "Firefox Homepage" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\Homepage\Command" "" 'rundll32.exe url.dll,FileProtocolHandler http://www.mozilla.org/products/firefox/' DetailPrint "Homepage option added." SectionEnd Section "About Firefox" About WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\About" "" "About Firefox" WriteRegStr HKCR "CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\About\Command" "" '"$INSTDIR\firefox.exe" about:' WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\About" "" "About Firefox" WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{6C27B62A-A59F-434A-9D93-C4DFFB764AB4}\Shell\About\Command" "" '"$INSTDIR\firefox.exe" about:' DetailPrint "About option added." SectionEnd LangString DESC_Prefetch ${LANG_ENGLISH} "Uses Windows XP prefetching when opening Firefox." LangString DESC_ProfileManager ${LANG_ENGLISH} "Opens the Firefox Profile Manager." LangString DESC_SafeMode ${LANG_ENGLISH} "Starts Firefox in Safe Mode for troubleshooting." LangString DESC_Homepage ${LANG_ENGLISH} "Opens the Firefox product homepage." LangString DESC_About ${LANG_ENGLISH} "Displays information about your Firefox installation." !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_DESCRIPTION_TEXT ${About} $(DESC_About) !insertmacro MUI_FUNCTION_DESCRIPTION_END