是否可以将exe打包到NSIS生成的首先运行的安装程序中?

是否可以将exe打包到NSIS生成的首先运行的安装程序中?,nsis,Nsis,是否可以生成一个NSIS安装程序(使用.nsi)来打包一个exe(比如foobar.exe),然后在安装程序正常安装程序之前运行该程序?我假设在运行它之前,它必须将exe解压缩到temp dir,这很好。但是,它必须在主安装之前运行 Initpluginsdir File "/oname=$pluginsdir\myapp.exe" "c:\build\myapp.exe" ExecWait '"$pluginsdir\myapp.exe"' Delete "$pluginsdir\myapp.

是否可以生成一个NSIS安装程序(使用.nsi)来打包一个exe(比如foobar.exe),然后在安装程序正常安装程序之前运行该程序?我假设在运行它之前,它必须将exe解压缩到temp dir,这很好。但是,它必须在主安装之前运行

Initpluginsdir
File "/oname=$pluginsdir\myapp.exe" "c:\build\myapp.exe"
ExecWait '"$pluginsdir\myapp.exe"'
Delete "$pluginsdir\myapp.exe" ;delete is optional, $pluginsdir is auto-deleted when installer quits

在第一节或.onInit中的其他代码之前放置(取决于myapp.exe的功能等)

不确定NSIS,但我经常使用Inno设置: