我想製作一個自解壓exe(abcdInstaller.exe),它運行另一個exe(AppInstaller.apk,這是在我的電腦上安裝abcd.apk)。下面的腳本工作正常,但當我運行abcdInstaller.exe時,它也提取當前目錄中的這兩個文件(從我運行此exe文件)並運行AppInstaller.exe。如何使用NSIS製作自解壓exe文件?
但我想要什麼,用戶只需點擊abcdInstaller.exe和abcdInstaller.exe將在後臺運行AppInstaller.exe,這將完成其工作。
!include LogicLib.nsh
!include WinMessages.nsh
SilentInstall silent
RequestExecutionLevel user ;no elevation needed for this test
ShowInstDetails hide
# this will be the created executable archive
OutFile "abcdInstaller.exe"
InstallDir $EXEDIR
# the executable part
Section
# define the output path for the following files
SetOutPath $INSTDIR
# define what to install and place it in the output path...
# ...app...
File AppInstaller.exe
# ...and the library.
File abcd.apk
# run application
ExecShell "open" "AppInstaller.exe"
# done
SectionEnd
我試着評論SetOutPath $ INSTDIR,但沒有任何反應。
請給出一些建議。