/**************************************************************************/ /* 1. Header file */ /**************************************************************************/ !include "MUI.nsh" !include "LogicLib.nsh" !include "WordFunc.nsh" !insertmacro WordFind !insertmacro un.WordReplace /*************************************************************************/ /* General Attributes */ /*************************************************************************/ SetCompressor /SOLID lzma !define PRODUCT "WinARM" !define VERSION "20060331" !define EXECNAME "winarm" !define SWREGKEY "Software\${PRODUCT}" Name "${PRODUCT} ${VERSION}" OutFile "${EXECNAME}-${VERSION}-setup.exe" BrandingText "${PRODUCT} ${VERSION}" ; The default installation directory InstallDir "$PROGRAMFILES\WinARM-${VERSION}" ; Registry key to check for directory (so if you install again, it will ; overwrite the old one automatically) InstallDirRegKey HKCU "${SWREGKEY}\${VERSION}" "" /* * Variables. */ Var StartMenuFolder Var AddWinARMPath Var AddWinARMUtilsPath /**************************************************************************/ /* 2. Interface Configuration */ /**************************************************************************/ /* * General Interface Settings */ !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP ${NSISDIR}\Contrib\Graphics\Header\nsis.bmp !define MUI_ICON ${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico !define MUI_UNICON ${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico /* * Interface Resource Settings */ /* * Welcome/Finish Page Interface Settings */ /* * Welcome/Finish Page InstallOptions INI Settings */ /* * Uninstaller Welcome/Finish Page Settings */ /* * Uninstaller Welcome/Finish Page Interface INI Settings */ /* * License Page Interface Settings */ /* * Components Page Interface Settings */ /* * Installation Page Interface Settings */ /* * Installer Finish Page Interface Settings */ !define MUI_FINISHPAGE_NOAUTOCLOSE /* * Uninstaller Finish Page Interface Settings */ !define MUI_UNFINISHPAGE_NOAUTOCLOSE /* * Abort Warning Settings */ !define MUI_ABORTWARNING /* * Uninstaller Abort Warning Settings */ !define MUI_UNABORTWARNING /**************************************************************************/ /* 3. Pages */ /**************************************************************************/ /* * Page Settings */ ; !define MUI_COMPONENTSPAGE_NODESC !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_STARTMENUPAGE_DEFAULTFOLDER "WinARM" !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" !define MUI_STARTMENUPAGE_REGISTRY_KEY "${SWREGKEY}\${VERSION}" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !define MUI_FINISHPAGE_LINK "Visit the WinARM site for the latest news and support" !define MUI_FINISHPAGE_LINK_LOCATION "http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/#winarm" !define MUI_CUSTOMFUNCTION_GUIINIT myGUIInit !define MUI_CUSTOMFUNCTION_UNGUIINIT un.myGUIInit /* * Installer Pages */ !insertmacro MUI_PAGE_WELCOME /* * License page 1 */ !define MUI_LICENSEPAGE_RADIOBUTTONS !insertmacro MUI_PAGE_LICENSE "license.txt" /* * License page 2 */ !define MUI_LICENSEPAGE_RADIOBUTTONS !insertmacro MUI_PAGE_LICENSE "gpl.txt" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH /* * Uninstaller Pages */ !insertmacro MUI_UNPAGE_WELCOME !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_FINISH ;-------------------------------- ;very important!!! XPStyle off /**************************************************************************/ /* 4. Custom functions */ /**************************************************************************/ Function .onInit System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' Pop $R0 StrCmp $R0 0 +3 MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." Abort InitPluginsDir File "/oname=$PLUGINSDIR\button.bmp" "${NSISDIR}\Contrib\skinnedbutton\skins\ishield.bmp" StrCpy $AddWinARMPath "0" StrCpy $AddWinARMUtilsPath "0" FunctionEnd Function myGUIInit skinnedbutton::skinit /NOUNLOAD "$PLUGINSDIR\button.bmp" Pop $0 StrCmp $0 "success" noerror MessageBox MB_ICONEXCLAMATION|MB_OK "skinned button error: $0" noerror: FunctionEnd Function .onGUIEnd ${If} $AddWinARMPath = "1" ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" ${WordFind} "$R1" "$INSTDIR\bin" "E+1{" $R0 IfErrors 0 WinARMPathIsAvailable StrCpy $R1 "$R1;$INSTDIR\bin" WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" "$R1" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "EnvPathWinARM" "$INSTDIR\bin" WinARMPathIsAvailable: ${EndIf} ${If} $AddWinARMUtilsPath = "1" ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" ${WordFind} "$R1" "$INSTDIR\utils\bin" "E+1{" $R0 IfErrors 0 WinARMUtilsPathIsAvailable StrCpy $R1 "$R1;$INSTDIR\utils\bin" WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" "$R1" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "EnvPathWinARMUtils" "$INSTDIR\utils\bin" WinARMUtilsPathIsAvailable: ${EndIf} skinnedbutton::unskinit FunctionEnd Function un.onInit InitPluginsDir File "/oname=$PLUGINSDIR\button.bmp" "${NSISDIR}\Contrib\skinnedbutton\skins\ishield.bmp" FunctionEnd Function un.myGUIInit skinnedbutton::skinit /NOUNLOAD "$PLUGINSDIR\button.bmp" Pop $0 StrCmp $0 "success" noerror MessageBox MB_ICONEXCLAMATION|MB_OK "skinned button error: $0" noerror: FunctionEnd Function un.onGUIEnd skinnedbutton::unskinit FunctionEnd /**************************************************************************/ /* 5. Language files */ /**************************************************************************/ !insertmacro MUI_LANGUAGE "English" /**************************************************************************/ /* 6. Reserve files */ /**************************************************************************/ /**************************************************************************/ /* 7. Your own sections and functions */ /**************************************************************************/ /**************************************************************************/ /* 8. Section descriptions */ /**************************************************************************/ /* * Start Menu Entries */ LangString StartInstallDir ${LANG_ENGLISH} "${PRODUCT}" LangString StartWinARMDoc ${LANG_ENGLISH} "${PRODUCT} Documentation" LangString StartWebsite ${LANG_ENGLISH} "${PRODUCT} on the Web" LangString StartUninstall ${LANG_ENGLISH} "Uninstall ${PRODUCT}" /* * Section WinARM */ LangString SectGrpWinARM ${LANG_ENGLISH} "${PRODUCT}" LangString SectWinARMBinaries ${LANG_ENGLISH} "Executable for ${PRODUCT}" LangString SectWinARMAddPath ${LANG_ENGLISH} "Add ${PRODUCT} to the PATH variable" LangString DESC_WinARM ${LANG_ENGLISH} "Includes the WinARM compiler." LangString DESC_WinARMUtils ${LANG_ENGLISH} "Includes make, cp, rm, sh, and mkdir." /* * Section MAKE Utils */ LangString SectGrpWinARMUtils ${LANG_ENGLISH} "Make Utils" LangString SectWinARMUtilsBinaries ${LANG_ENGLISH} "Executable for Make Utils" LangString SectWinARMUtilsAddPath ${LANG_ENGLISH} "Add Make Utils to the PATH variable" /* * Section Examples */ LangString SectGrpExamples ${LANG_ENGLISH} "Examples" LangString DESC_Examples ${LANG_ENGLISH} "Some examples" LangString DESC_FreeRTOS ${LANG_ENGLISH} "FreeRTOS example" LangString DESC_ADuC7026 ${LANG_ENGLISH} "ADuC7026 examples" LangString DESC_AT91SAM7S64 ${LANG_ENGLISH} "AT91SAM7S64 examples" LangString DESC_LPC2106 ${LANG_ENGLISH} "LPC2106 examples" LangString DESC_LPC2129 ${LANG_ENGLISH} "LPC2129 examples" LangString DESC_LPC2138 ${LANG_ENGLISH} "LPC2138 examples" /* * Programmer’s Notepad */ LangString SectGrpPN ${LANG_ENGLISH} "Programmer’s Notepad" LangString DESC_PN ${LANG_ENGLISH} "Programmer’s Notepad" /* * Other */ LangString SectGrpAddTools ${LANG_ENGLISH} "Additional tools" LangString DESC_AddTools ${LANG_ENGLISH} "Additional tools" LangString DESC_CodeSourceryGDB ${LANG_ENGLISH} "GDB (command-line without Insight) Version 6.3.50.20051020-cvs from Codesourcery" LangString DESC_InsightGDB ${LANG_ENGLISH} "Insight-GDB 6.4.50 - Win32-Native from www.devkitpro.org" LangString DESC_HJTAG ${LANG_ENGLISH} "H-JTAG (Ver. 20060313) made by twentyone" LangString DESC_JLINK ${LANG_ENGLISH} "J-Link gdb-Server V1.0 from the gnuarm yahoo-group" LangString DESC_OpenOCD ${LANG_ENGLISH} "Open On-Chip debugger (openocd, SVN55) made by Dominic Rath" LangString DESC_OCDRemote ${LANG_ENGLISH} "Setup-Exe of Macraigor's OCDRemote (Wigger-gdb interface, Ver. 2.16)" LangString DESC_lpc21isp ${LANG_ENGLISH} "ISP software for Philips LPC2xxx and the Analog Devices ADUC 70xx family by Martin Maurer." LangString DESC_NewLibLPC ${LANG_ENGLISH} "Rel.5 (reentrant syscalls for newlib and Philips LPCs)" /**************************************************************************/ /* 9. Install section */ /**************************************************************************/ /* * WinARM */ SectionGroup "$(SectGrpWinARM)" DescWinARM Section "$(SectWinARMBinaries)" SectionIn RO SetOutPath $INSTDIR\arm-elf File /r "..\arm-elf\*.*" SetOutPath $INSTDIR\bin File /r "..\bin\*.*" SetOutPath $INSTDIR\doc File /r "..\doc\*.*" SetOutPath $INSTDIR\include File /r "..\include\*.*" SetOutPath $INSTDIR\info File /r "..\info\*.*" SetOutPath $INSTDIR\lib File /r "..\lib\*.*" SetOutPath $INSTDIR\libexec File /r "..\libexec\*.*" SetOutPath $INSTDIR\man File /r "..\man\*.*" SetOutPath $INSTDIR File "..\*.*" SectionEnd Section "$(SectWinARMAddPath)" StrCpy $AddWinARMPath "1" SectionEnd SectionGroupEnd /* * MAKE Utils */ SectionGroup "$(SectGrpWinARMUtils)" DescWinARMUtils Section "$(SectWinARMUtilsBinaries)" SetOutPath $INSTDIR\utils\bin File "..\utils\bin\*.*" SectionEnd Section "$(SectWinARMUtilsAddPath)" StrCpy $AddWinARMUtilsPath "1" SectionEnd SectionGroupEnd /* * Examples */ SectionGroup "$(SectGrpExamples)" DescExamples Section "FreeRTOS" DescFreeRTOS SetOutPath $INSTDIR\examples\FreeRTOS_4_0_0_armgcc File /r "..\examples\FreeRTOS_4_0_0_armgcc\*.*" SectionEnd Section "ADuC7026" DescADuC7026 SetOutPath $INSTDIR\examples\ADuC7026_blink File /r "..\examples\ADuC7026_blink\*.*" SectionEnd Section "AT91SAM7S64" DescAT91SAM7S64 SetOutPath $INSTDIR\examples\at91sam7s64_Atmel_example File /r "..\examples\at91sam7s64_Atmel_example\*.*" SetOutPath $INSTDIR\examples\at91sam7s64_Atmel_interrupt File /r "..\examples\at91sam7s64_Atmel_interrupt\*.*" SetOutPath $INSTDIR\examples\at91sam7s64_basicusb File /r "..\examples\at91sam7s64_basicusb\*.*" SetOutPath $INSTDIR\examples\at91sam7s64_Hello File /r "..\examples\at91sam7s64_Hello\*.*" SetOutPath $INSTDIR\examples\at91sam7s64_uart_simple File /r "..\examples\at91sam7s64_uart_simple\*.*" SectionEnd Section "LPC2106" DescLPC2106 SetOutPath $INSTDIR\examples\lpc2106_blink_irq_interwork File /r "..\examples\lpc2106_blink_irq_interwork\*.*" SetOutPath $INSTDIR\examples\lpc2106_blink_switch File /r "..\examples\lpc2106_blink_switch\*.*" SetOutPath $INSTDIR\examples\lpc2106_blink_switch_cpp File /r "..\examples\lpc2106_blink_switch_cpp\*.*" SetOutPath $INSTDIR\examples\lpc2106_blink_switch_irq File /r "..\examples\lpc2106_blink_switch_irq\*.*" SetOutPath $INSTDIR\examples\lpc2106_ds18x20 File /r "..\examples\lpc2106_ds18x20\*.*" SetOutPath $INSTDIR\examples\lpc2106_hello_rs232_newlib File /r "..\examples\lpc2106_hello_rs232_newlib\*.*" SetOutPath $INSTDIR\examples\lpc2106_newlib-lpc3_test2 File /r "..\examples\lpc2106_newlib-lpc3_test2\*.*" SetOutPath $INSTDIR\examples\lpc2106_uart0 File /r "..\examples\lpc2106_uart0\*.*" SetOutPath $INSTDIR\examples\lpc2106_uart0_irq File /r "..\examples\lpc2106_uart0_irq\*.*" SectionEnd Section "LPC2129" DescLPC2129 SetOutPath $INSTDIR\examples\lpc2129_adc_stdio File /r "..\examples\lpc2129_adc_stdio\*.*" SetOutPath $INSTDIR\examples\lpc2129_blinkswitch File /r "..\examples\lpc2129_blinkswitch\*.*" SetOutPath $INSTDIR\examples\lpc2129_blinkswitch_irq File /r "..\examples\lpc2129_blinkswitch_irq\*.*" SetOutPath $INSTDIR\examples\lpc2129_CanAll_V110 File /r "..\examples\lpc2129_CanAll_V110\*.*" SetOutPath $INSTDIR\examples\lpc2129_newlib_cpp File /r "..\examples\lpc2129_newlib_cpp\*.*" SetOutPath $INSTDIR\examples\lpc2129_ramfunction File /r "..\examples\lpc2129_ramfunction\*.*" SetOutPath $INSTDIR\examples\lpc2129_uart0_irq File /r "..\examples\lpc2129_uart0_irq\*.*" SectionEnd Section "LPC2138" DescLPC2138 SetOutPath $INSTDIR\examples\lpc2129_uart0_irq File /r "..\examples\lpc2129_uart0_irq\*.*" SectionEnd Section "-Hidden" SetOutPath $INSTDIR\examples File "..\examples\*.*" SectionEnd SectionGroupEnd /* * Programmer’s Notepad */ Section "$(SectGrpPN)" DescPN SetOutPath $INSTDIR\pn File /r "..\pn\*.*" SectionEnd /* * Additional tools */ SectionGroup "$(SectGrpAddTools)" DescAddTools Section "CodeSourcery GDB" DescCodeSourceryGDB SetOutPath $INSTDIR\utils\codesourcery_gdb_6_3_50 File /r "..\utils\codesourcery_gdb_6_3_50\*.*" SectionEnd Section "Insight GDB" DescInsightGDB SetOutPath $INSTDIR\utils\insight_gdb_6_4_50 File /r "..\utils\insight_gdb_6_4_50\*.*" SectionEnd Section "H-JTAG" DescHJTAG SetOutPath $INSTDIR\utils\h_jtag File /r "..\utils\h_jtag\*.*" SectionEnd Section "J-Link gdb-Server" DescJLINK SetOutPath $INSTDIR\utils\jlinkgdbserver File /r "..\utils\jlinkgdbserver\*.*" SectionEnd Section "OpenOCD" DescOpenOCD SetOutPath $INSTDIR\utils\openocd File /r "..\utils\openocd\*.*" SectionEnd Section "Macraigor's OCDRemote" DescOCDRemote SetOutPath $INSTDIR\utils\macraigor_tools File /r "..\utils\macraigor_tools\*.*" SectionEnd Section "lpc21isp" Desclpc21isp SetOutPath $INSTDIR\utils\lpc21isp_beta_src File /r "..\utils\lpc21isp_beta_src\*.*" SectionEnd Section "newlib-lpc" DescNewLibLPC SetOutPath $INSTDIR\utils\newlib_lpc_rel5_src File /r "..\utils\newlib_lpc_rel5_src\*.*" SectionEnd Section "-Hidden" SetOutPath $INSTDIR\utils File "..\utils\*.*" SectionEnd SectionGroupEnd /* * Hidden */ Section "-Hidden" !insertmacro MUI_STARTMENU_WRITE_BEGIN Application CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(StartInstallDir).lnk" "$INSTDIR" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(StartWinARMDoc).lnk" "$INSTDIR\readme.htm" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(StartWebsite).lnk" "$INSTDIR\WinARM.url" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(StartUninstall).lnk" "$INSTDIR\uninstall-${EXECNAME}.exe" !insertmacro MUI_STARTMENU_WRITE_END ;Store installation folder WriteRegStr HKCU "${SWREGKEY}\${VERSION}" "InstallDir" $INSTDIR WriteUninstaller "$INSTDIR\uninstall-${EXECNAME}.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "UninstallString" '"$INSTDIR\uninstall-${EXECNAME}.exe"' WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "DisplayIcon" "$INSTDIR\bin\${EXECNAME}.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "DisplayName" "$(^Name)" /* * Support information */ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "Publisher" "" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "URLInfoAbout" "" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "DisplayVersion" "${VERSION}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "Contact" "" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "HelpLink" "http://en.mikrocontroller.net/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "HelpTelephone" "" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "Readme" "$INSTDIR\readme.htm" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "URLUpdateInfo" "http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/#winarm" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "Comments" "" SectionEnd /* * Assign language strings to sections */ !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${DescWinARM} $(DESC_WinARM) !insertmacro MUI_DESCRIPTION_TEXT ${DescWinARMUtils} $(DESC_WinARMUtils) !insertmacro MUI_DESCRIPTION_TEXT ${DescExamples} $(DESC_Examples) !insertmacro MUI_DESCRIPTION_TEXT ${DescFreeRTOS} $(DESC_FreeRTOS) !insertmacro MUI_DESCRIPTION_TEXT ${DescADuC7026} $(DESC_ADuC7026) !insertmacro MUI_DESCRIPTION_TEXT ${DescAT91SAM7S64} $(DESC_AT91SAM7S64) !insertmacro MUI_DESCRIPTION_TEXT ${DescLPC2106} $(DESC_LPC2106) !insertmacro MUI_DESCRIPTION_TEXT ${DescLPC2129} $(DESC_LPC2129) !insertmacro MUI_DESCRIPTION_TEXT ${DescLPC2138} $(DESC_LPC2138) !insertmacro MUI_DESCRIPTION_TEXT ${DescPN} $(DESC_PN) !insertmacro MUI_DESCRIPTION_TEXT ${DescAddTools} $(DESC_AddTools) !insertmacro MUI_DESCRIPTION_TEXT ${DescCodeSourceryGDB} $(DESC_CodeSourceryGDB) !insertmacro MUI_DESCRIPTION_TEXT ${DescInsightGDB} $(DESC_InsightGDB) !insertmacro MUI_DESCRIPTION_TEXT ${DescHJTAG} $(DESC_HJTAG) !insertmacro MUI_DESCRIPTION_TEXT ${DescJLINK} $(DESC_JLINK) !insertmacro MUI_DESCRIPTION_TEXT ${DescOpenOCD} $(DESC_OpenOCD) !insertmacro MUI_DESCRIPTION_TEXT ${DescOCDRemote} $(DESC_OCDRemote) !insertmacro MUI_DESCRIPTION_TEXT ${Desclpc21isp} $(DESC_lpc21isp) !insertmacro MUI_DESCRIPTION_TEXT ${DescNewLibLPC} $(DESC_NewLibLPC) !insertmacro MUI_FUNCTION_DESCRIPTION_END /**************************************************************************/ /* 10. Unnstall section */ /**************************************************************************/ Section "Uninstall" /* Remove WinARM path */ ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "EnvPathWinARM" IfErrors WinARMPathNotFound 0 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" ${un.WordReplace} "$R1" ";$R0" "" "+" $R1 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" "$R1" WinARMPathNotFound: /* Remove WinARM Utils path */ ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "EnvPathWinARMUtils" IfErrors WinARMUtilsPathNotFound 0 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" ${un.WordReplace} "$R1" ";$R0" "" "+" $R1 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" "$R1" WinARMUtilsPathNotFound: /* Remove startmenu */ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder RMDir /r "$SMPROGRAMS\$StartMenuFolder" /* Remove uninstaller */ Delete "$INSTDIR\uninstall-${EXECNAME}.exe" /* Remove directory */ RMDir /r "$INSTDIR" /* Remove registry keys */ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" DeleteRegKey HKLM "${SWREGKEY}" DeleteRegKey HKCU "${SWREGKEY}" SectionEnd /*** EOF ***/