【发布时间】:2011-07-04 10:00:59
【问题描述】:
我正在使用以下 NSIS 脚本:
Name "My app wrapper"
Outfile "MyAppSetup.exe"
InstallDir $TEMP\MyApp\Install
Function .onInit
SetSilent silent
FunctionEnd
Section ""
SetOutPath $TEMP\MyApp\Install
File installer.msi
File setup.exe
Exec setup.exe
SectionEnd
目的是安装程序会将这两个文件installer.msi 和setup.exe(它是安装prereqs 然后调用installer.msi 的引导程序)打包到MyApp Setup.exe 文件中。当 MyAppSetup.exe 运行时,它应该将 installer.msi 和 setup.exe 解压缩到 $Temp\MyApp\Install 目录,并且应该从该目录运行 setup.exe。
但是,当我从桌面运行 MyAppSetup 时,它会执行它在桌面上找到的 setup.exe 文件,我什至在 C:\Temp 中都看不到 MyApp\Install 目录。
我需要做什么才能让这个脚本将文件安装到正确的位置并执行正确的文件?
【问题讨论】:
标签: nsis