2
* This is a sample comment box
5
;-----------------------------------------
6
;Sets Default Compression to lzma
10
;-----------------------------------------
15
;-----------------------------------------
21
InstallDir $PROGRAMFILES\Example
22
InstallDirRegKey HKLM "Software\Example" ""
24
;----------------------------------------
29
;-----------------------------------------
32
!define MUI_ABORTWARNING
33
!define MUI_UNABORTWARNING
35
;-----------------------------------------
38
!insertmacro MUI_PAGE_WELCOME
39
!insertmacro MUI_PAGE_DIRECTORY
40
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
41
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Example"
42
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Example"
43
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
44
!insertmacro MUI_PAGE_INSTFILES
45
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
46
!insertmacro MUI_PAGE_FINISH
48
!insertmacro MUI_UNPAGE_WELCOME
49
!insertmacro MUI_UNPAGE_CONFIRM
50
!insertmacro MUI_UNPAGE_DIRECTORY
51
!insertmacro MUI_UNPAGE_INSTFILES
52
!insertmacro MUI_UNPAGE_FINISH
54
;-----------------------------------------
57
!insertmacro MUI_LANGUAGE "English"
59
;-----------------------------------------
64
WriteRegStr HKLM "Software\Example" "Install_Dir" $INSTDIR
65
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example" "DisplayIcon" $INSTDIR\uninstall.exe,0
66
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example" "DisplayName" "Example"
67
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example" "InstallLocation" $INSTDIR
68
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example" "NoModify" 1
69
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example" "NoRepair" 1
70
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example" "UninstallString" $INSTDIR\uninstall.exe
72
!insertmacro MUI_STARTMENU_WRITE_BEGIN "Application"
74
CreateDirectory $SMPROGRAMS\$STARTMENU_FOLDER
75
CreateShortCut $SMPROGRAMS\$STARTMENU_FOLDER\Uninstall Example.lnk $INSTDIR\uninstall.exe
77
!insertmacro MUI_STARTMENU_WRITE_END
81
WriteUninstaller "uninstall.exe"
85
;-----------------------------------------
90
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example"
91
DeleteRegKey HKLM "Software\Example"
93
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $STARTMENU_FOLDER
95
RMDir /r $SMPROGRAMS\$STARTMENU_FOLDER
97
Delete $INSTDIR\uninstall.exe