2012-09-24 38 views
0

我得到了這個非常奇怪的問題,我的NSIS安裝程序,它顯示組件頁面/部分,一切都已安裝後?NSIS組件頁面在文件安裝完成後出現?

我沒有得到這個礦井的另一個安裝程序,我想不出什麼似乎是造成這個..

Y.

編輯:

代碼:

; 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

請張貼代碼 – gammay

+0

添加代碼:) –

回答

1

頁面是按照顯示的順序Page!insertmacro MUI_PAGE_xx列出

的發言

你弄丟了組件頁面:

; Instfiles page 
!insertmacro MUI_PAGE_INSTFILES 
!insertmacro MUI_PAGE_COMPONENTS 

這裏的頁面選擇組件文件安裝進展後會出現。

+0

聖潔的通心粉,是的,我把它與我的其他intsaller相比,你是對的。感謝Seki! –

相關問題