我的NSIS安装程序出现了这个非常奇怪的问题,在安装完所有内容后显示组件页面/部分?
我没有在我的另一个安装程序上得到这个,我无法弄清楚是什么原因导致这个......
ý。
编辑:
代码:
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "SnapShot BK"
!define PRODUCT_VERSION "1.0.4"
!define PRODUCT_PUBLISHER "DataAccess Europe"
!define PRODUCT_WEB_SITE "http://www.dataaccess.eu/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\snapshotbk.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
; MUI 1.67 compatible ------
!include "MUI.nsh"
!include "Sections.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\snapshot.ico"
!define MUI_UNICON "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\snapshot.ico"
; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\License Agreement.txt"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
;Variable for the icons_group
var ICONS_GROUP
;Start menu page
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "SnapShot BK"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_COMPONENTS
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\snapshotbk.exe"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.txt"
!insertmacro MUI_PAGE_FINISH
; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_COMPONENTS
; Language files
!insertmacro MUI_LANGUAGE "English"
; MUI end ------
page components
page instfiles
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Setup.exe"
InstallDir "C:\Appl\SnapShot BK"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show
Section "SnapShot BK AES" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\snapshotbk.exe"
CreateDirectory "$SMPROGRAMS\SnapShot BK"
CreateShortCut "$SMPROGRAMS\SnapShot BK\Snapshot BK.lnk" "$INSTDIR\snapshotbk.exe"
CreateShortCut "$DESKTOP\Snapshot BK.lnk" "$INSTDIR\snapshotbk.exe"
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\snapshot.ico"
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\settings.sts"
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\readme.txt"
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\Exclude.txt"
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\AES\AESauth.sts"
SectionEnd
Section "SnapShot BK RC4" SEC02
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\snapshotbk.exe"
CreateDirectory "$SMPROGRAMS\SnapShot BK"
CreateShortCut "$SMPROGRAMS\SnapShot BK\Snapshot BK.lnk" "$INSTDIR\snapshotbk.exe"
CreateShortCut "$DESKTOP\Snapshot BK.lnk" "$INSTDIR\snapshotbk.exe"
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\snapshot.ico"
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\settings.sts"
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\readme.txt"
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\Exclude.txt"
File "C:\Documents and Settings\Yoshi\Desktop\Snapshot BK Installer\Files\RC4\RC4auth.sts"
SectionEnd
Section -AdditionalIcons
CreateShortCut "$SMPROGRAMS\SnapShot BK\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\snapshotbk.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}" "DisplayIcon" "$INSTDIR\snapshotbk.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
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
Abort
FunctionEnd
Section "Un.SnapShot BK AES" SE01
Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\Exclude.txt"
Delete "$INSTDIR\readme.txt"
Delete "$INSTDIR\settings.sts"
Delete "$INSTDIR\snapshot.ico"
Delete "$INSTDIR\snapshotbk.exe"
Delete "$INSTDIR\AESauth.sts"
Delete "$INSTDIR\Exclude.txt"
Delete "$INSTDIR\readme.txt"
Delete "$INSTDIR\settings.sts"
Delete "$INSTDIR\snapshot.ico"
Delete "$INSTDIR\snapshotbk.exe"
Delete "$SMPROGRAMS\SnapShot BK\Uninstall.lnk"
Delete "$DESKTOP\Snapshot BK.lnk"
Delete "$SMPROGRAMS\SnapShot BK\Snapshot BK.lnk"
RMDir "$SMPROGRAMS\SnapShot BK"
RMDir "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd
Section "Un.SnapShot BK RC4" SE02
Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\Exclude.txt"
Delete "$INSTDIR\readme.txt"
Delete "$INSTDIR\settings.sts"
Delete "$INSTDIR\snapshot.ico"
Delete "$INSTDIR\snapshotbk.exe"
Delete "$INSTDIR\RC4auth.sts"
Delete "$INSTDIR\Exclude.txt"
Delete "$INSTDIR\readme.txt"
Delete "$INSTDIR\settings.sts"
Delete "$INSTDIR\snapshot.ico"
Delete "$INSTDIR\snapshotbk.exe"
Delete "$SMPROGRAMS\SnapShot BK\Uninstall.lnk"
Delete "$DESKTOP\Snapshot BK.lnk"
Delete "$SMPROGRAMS\SnapShot BK\Snapshot BK.lnk"
RMDir "$SMPROGRAMS\SnapShot BK"
RMDir "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd
答案 0 :(得分:1)
页面按照列出Page
或!insertmacro MUI_PAGE_xx
语句的顺序显示
您错放了组件页面:
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_COMPONENTS
此处选择组件的页面将在文件安装进度后显示。