Код:
!insertmacro MUI_UNPAGE_FINISH
Раскомментировали?
Вот смотрите, стандартный код, который создаёт HM NIS Edit, работающий с моим описание
читать дальше »
Код:
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Моя программа"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "Моя компания, LLC."
!define PRODUCT_WEB_SITE "http://www.mycompany.com"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
; MUI 1.67 compatible ------
Var RestartExplorerSectionChecked
!include "MUI.nsh"
!define MUI_FINISHPAGE_REBOOTLATER_DEFAULT
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_FINISHPAGE_RUN "$INSTDIR\WinXP_Reg.exe"
!define MUI_FINISHPAGE_RUN_TEXT "Запустить '${PRODUCT_NAME} ${PRODUCT_VERSION}'"
!define MUI_FINISHPAGE_RUN_NOTCHECKED
; Welcome page
!insertmacro MUI_PAGE_WELCOME
; Components page
!insertmacro MUI_PAGE_COMPONENTS
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!insertmacro MUI_PAGE_FINISH
; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
; Language files
!insertmacro MUI_LANGUAGE "Russian"
; MUI end ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "setup.exe"
InstallDir "$PROGRAMFILES\Моя программа"
ShowInstDetails show
ShowUnInstDetails show
Section "MainSection" SEC01
createdirectory $INSTDIR
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd
; Section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} ""
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "Удаление программы $(^Name) было успешно завершено."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Вы уверены в том, что желаете удалить $(^Name) и все компоненты программы?" IDYES +2
Abort
FunctionEnd
Section "un.TEST"
#StrCpy $RestartExplorerSectionChecked 1
SectionEnd
Section Uninstall
MessageBox MB_YESNO|MB_ICONQUESTION "Показать?" idno +3
StrCpy $RestartExplorerSectionChecked 0
goto +2
StrCpy $RestartExplorerSectionChecked 1
StrCmp $RestartExplorerSectionChecked "1" 0 reboot
RMDir /r "$INSTDIR"
SetRebootFlag false
goto done
reboot:
RMDir /r /REBOOTOK "$INSTDIR"
SetRebootFlag true
done:
SetAutoClose true
Delete "$INSTDIR\uninst.exe"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
SectionEnd