gpt4 book ai didi

nsis - 使用 NSIS 嵌入其他安装程序

转载 作者:行者123 更新时间:2023-12-04 02:44:36 47 4
gpt4 key购买 nike

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

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

!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

最佳答案

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

关于nsis - 使用 NSIS 嵌入其他安装程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19100826/

47 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com