nsis作为其他安装的安装程序

时间:2012-08-24 15:15:30

标签: nsis

我正在将NSIS用于其他安装的安装程序。复制完所有需要的文件后我运行它:

Section "Indusoft" SEC02
  SetOutPath $INSTDIR\DISK1
  ExecWait "$INSTDIR\DISK1\setup.exe"
SectionEnd

Section -Prerequisites
  SetOutPath $INSTDIR\Prerequisites
  MessageBox MB_YESNO "Install FTP Server?" /SD IDYES IDNO endFTPServer
    ExecWait "$INSTDIR\Prerequisites\FileZilla_Server-0_9_41"
    Goto endFTPServer
  endFTPServer:
  MessageBox MB_YESNO "Install MS SQL Server?" /SD IDYES IDNO endMSSQLServer
    ExecWait "$INSTDIR\Prerequisites\SQLEXPRWT_x86_ENU.exe"
    Goto endMSSQLServer
  endMSSQLServer:
SectionEnd

现在我希望My Aplication运行一个安装在Indusoft Section的exe。我的想法是打开一个对话框,用户选择文件,然后创建用户选择的文件的快捷方式:

CreateShortCut "$SMPROGRAMS\My application\My application.lnk" "$INSTDIR\AppMainExe.exe"

这可能吗?

由于

编辑: 我找到了选择文件但是这样我创建了一个在完成对话框后出现的新页面,如何在完成之前显示它?感谢

Var Dialog
Var Text

Page custom nsDialogsPage

Function nsDialogsPage

    nsDialogs::Create 1018
    Pop $Dialog

    nsDialogs::SelectFileDialog
    Pop $Text

    ${NSD_CreateText} 0 13u 100% -13u $Text
    Pop $Text

    nsDialogs::Show

FunctionEnd

1 个答案:

答案 0 :(得分:0)

页面的显示顺序与源代码中的页面命令相同:

!insertmacro MUI_PAGE_INSTFILES
Page custom YourCustomPage
!insertmacro MUI_PAGE_FINISH
相关问题