【问题标题】:Embedding other installers using NSIS使用 NSIS 嵌入其他安装程序
【发布时间】:2013-09-30 18:04:10
【问题描述】:

我是 NSIS 脚本的新手。我想创建一个自定义安装程序,它将包裹另一个安装程序(FEKO)。 NSIS网站上建议的这种方法Embedding other installers对我不起作用

脚本编译正确,但未安装嵌入式应用程序。这是脚本

!include "MUI2.nsh"
!include "logiclib.nsh"

!insertmacro MUI_PAGE_WELCOME 
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"


#Name of the application we are trying to install
Name "FEKO"

# update this section to add 'contact' info
BrandingText "Please contact support at xyz@abc.com for any issues.   "


# define the name of installer
OutFile "Custom_FEKO_6.2_Installer.exe"

# define default installation directory
InstallDir "C:\FEKO\6.2\"

DirText "Choose a directory where you want to install FEKO"


# start default section
Section "FEKO Installation"

    # set the installation directory as the destination for the following actions
    SetOutPath $INSTDIR

    DetailPrint "Extracting FEKO Files into Installation Directory" 

    # specify files to go into the installation directory path
    File /r "C:\Feko_Installer\*"

    # set the current working directory
    SetOutPath "$INSTDIR"      
SectionEnd


Section "FEKO installation" FEKO
    DetailPrint "Installing Feko"

    # run the FEKO installer and wait for it to finish

    File "C:\Feko_Installer\feko_distrib_6.2_win64.exe"
    ExecWait "$INSTDIR\feko_distrib_6.2_win64.exe"

    DetailPrint "Finishing up Installation"
SectionEnd

【问题讨论】:

    标签: nsis


    【解决方案1】:
    1. 如果子安装程序需要管理员权限,您需要在脚本中输入RequestExecutionLevel admin。如果 exe 具有请求提升的清单,则 ExecWait (CreateProcess) 将失败。
    2. ExecWait 的正确引用是:ExecWait '"c:\full\path\to\app.exe" /param1 "par am 2" /param3'

    【讨论】:

    • 我也做了同样的事情,但在我的情况下它不起作用。我也依赖 DLL 文件和 exe 文件。如何在自定义安装时包含这些文件?
    猜你喜欢
    • 2020-03-26
    • 2012-08-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-02
    • 2014-08-30
    • 1970-01-01
    • 2013-02-12
    相关资源
    最近更新 更多