出现在我的安装程序中的空盒子?我该如何删除它?

时间:2022-04-08 07:34:32

I'm using a pretty simple install script for my application and its showing an empty box on the section selection screen. I would like to remove it, or at least know what its for and fill it up.

我正在为我的应用程序使用一个非常简单的安装脚本,并在部分选择屏幕上显示一个空框。我想删除它,或者至少知道它的用途并填写它。

here is a screenshot alt text http://i41.tinypic.com/688zmo.png

这是一个截图替代文字http://i41.tinypic.com/688zmo.png

and my install script

和我的安装脚本

; example2.nsi
;
; This script is based on example1.nsi, but it remember the directory, 
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install ICV-MRI into a directory that the user selects,

;--------------------------------
!include "MUI.nsh"

; The name of the installer
Name "ICV-MRI"

; The file to write
OutFile "ICV-MRI_Setup.exe"

; The default installation directory
InstallDir $PROGRAMFILES\ICV-MRI

; Registry key to check for directory (so if you install again, it will 
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\ICV-MRI" "Install_Dir"

; Request application privileges for Windows Vista
RequestExecutionLevel admin

Function LaunchLink
  ExecShell "" "$INSTDIR\mri.exe"
FunctionEnd

;--------------------------------

; Pages

Page components
Page directory
Page instfiles

UninstPage uninstConfirm
UninstPage instfiles

;  !insertmacro MUI_PAGE_WELCOME
;  !insertmacro MUI_PAGE_DIRECTORY
;  !insertmacro MUI_PAGE_INSTFILES

    # These indented statements modify settings for MUI_PAGE_FINISH
    !define MUI_FINISHPAGE_NOAUTOCLOSE
    !define MUI_FINISHPAGE_RUN
    !define MUI_FINISHPAGE_RUN_NOTCHECKED
    !define MUI_FINISHPAGE_RUN_TEXT "Run MRI when the installer closes"
    !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
    !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
  !insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"


;--------------------------------

; The stuff to install
Section "ICV-MRI (required)"

  SectionIn RO

  ; Set output path to the installation directory.
  SetOutPath $INSTDIR

  ; Put file there
  File "dist\bz2.pyd"
  File "dist\library.zip"
  File "dist\mri.exe"
  File "dist\PyQt4.QtCore.pyd"
  File "dist\PyQt4.QtGui.pyd"
  File "dist\python26.dll"
  File "dist\QtCore4.dll"
  File "dist\QtGui4.dll"
  File "dist\select.pyd"
  File "dist\sip.pyd"
  File "dist\unicodedata.pyd"
  File "dist\w9xpopen.exe"

  ; Write the installation path into the registry
  WriteRegStr HKLM SOFTWARE\ICV-MRI "Install_Dir" "$INSTDIR"

  ; Write the uninstall keys for Windows
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ICV-MRI" "DisplayName" "ICV-MRI"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ICV-MRI" "UninstallString" '"$INSTDIR\uninstall.exe"'
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ICV-MRI" "NoModify" 1
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ICV-MRI" "NoRepair" 1
  WriteUninstaller "uninstall.exe"

SectionEnd

; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"

  CreateDirectory "$SMPROGRAMS\ICV-MRI"
  CreateShortCut "$SMPROGRAMS\ICV-MRI\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
  CreateShortCut "$SMPROGRAMS\ICV-MRI\ICV-MRI.lnk" "$INSTDIR\mri.exe" "" "$INSTDIR\mri.exe" 0

SectionEnd

Section "Desktop Shortcuts"

  CreateShortCut "$DESKTOP\ICV-MRI.lnk" "$INSTDIR\mri.exe" "" "$INSTDIR\mri.exe" 0

SectionEnd

;--------------------------------

2 个解决方案

#1


That box is for the section description.

该框用于部分描述。

Take a look at the Modern UI Basic.nsi file:

看一下Modern UI Basic.nsi文件:


;--------------------------------
;Installer Sections

Section "Dummy Section" SecDummy

  SetOutPath "$INSTDIR"

  ;ADD YOUR OWN FILES HERE...

  ;Store installation folder
  WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR

  ;Create uninstaller
  WriteUninstaller "$INSTDIR\Uninstall.exe"

SectionEnd

;--------------------------------
;Descriptions

  ;Language strings
  LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."

  ;Assign language strings to sections
  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy) !insertmacro MUI_FUNCTION_DESCRIPTION_END

Read more Modern UI Readme, section on Components page descriptions.

阅读更多现代UI自述文件,有关组件页面描述的部分。

The Modern UI components page has a text box in which a description can be shown when the user hovers the mouse over a component. If you don't want to use these descriptions, insert the MUI_COMPONENTSPAGE_NODESC interface setting.

Modern UI组件页面有一个文本框,当用户将鼠标悬停在组件上时,可以在其中显示描述。如果您不想使用这些说明,请插入MUI_COMPONENTSPAGE_NODESC接口设置。

To set a description for a section, an additional parameter needs to be added to Section commmand with a unique identifier for the section. This name can later be used to set the description for this section.

要为节设置描述,需要在Section commmand中添加一个附加参数,并为该节添加唯一标识符。此名称稍后可用于设置此部分的说明。

#2


If you want to remove it, !define MUI_COMPONENTSPAGE_NODESC at the top of your script

如果要删除它,请在脚本顶部定义MUI_COMPONENTSPAGE_NODESC

#1


That box is for the section description.

该框用于部分描述。

Take a look at the Modern UI Basic.nsi file:

看一下Modern UI Basic.nsi文件:


;--------------------------------
;Installer Sections

Section "Dummy Section" SecDummy

  SetOutPath "$INSTDIR"

  ;ADD YOUR OWN FILES HERE...

  ;Store installation folder
  WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR

  ;Create uninstaller
  WriteUninstaller "$INSTDIR\Uninstall.exe"

SectionEnd

;--------------------------------
;Descriptions

  ;Language strings
  LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."

  ;Assign language strings to sections
  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy) !insertmacro MUI_FUNCTION_DESCRIPTION_END

Read more Modern UI Readme, section on Components page descriptions.

阅读更多现代UI自述文件,有关组件页面描述的部分。

The Modern UI components page has a text box in which a description can be shown when the user hovers the mouse over a component. If you don't want to use these descriptions, insert the MUI_COMPONENTSPAGE_NODESC interface setting.

Modern UI组件页面有一个文本框,当用户将鼠标悬停在组件上时,可以在其中显示描述。如果您不想使用这些说明,请插入MUI_COMPONENTSPAGE_NODESC接口设置。

To set a description for a section, an additional parameter needs to be added to Section commmand with a unique identifier for the section. This name can later be used to set the description for this section.

要为节设置描述,需要在Section commmand中添加一个附加参数,并为该节添加唯一标识符。此名称稍后可用于设置此部分的说明。

#2


If you want to remove it, !define MUI_COMPONENTSPAGE_NODESC at the top of your script

如果要删除它,请在脚本顶部定义MUI_COMPONENTSPAGE_NODESC