Archive: Using NSIS to create portable app?


Using NSIS to create portable app?
I would like to expand upon a portable app which I am currently packaging with WinRAR SFX. It does everything I need except I would like to be able to pass a parameter to my extracted app - something I would imagine I can do with NSIS.

So, I have an app I would like to package up with NSIS, and when the user clicks on the install, I want to extract the packaged files to the users TEMP path, run the EXE, then after the user exits - delete the temporary (application) files, and exit the install.

1. I am new to NSIS, so for starters, can I utilize NSIS for this?

2. I would like to pass the Path (of where the NSIS setup exe is being ran from) to the spawned application as a parameter. The purpose is so a user can run the NSIS packaged app from a USB drive, and so the application will read a related data file from the same path (if it exists). Can this be done?

Thanks in advance for helping a newbie. :rolleyes:

Cyberdude


try something like:

outfile someportableapp.exe
page instfiles

section
initpluginsdir
setoutpath $pluginsdir
file theapp.exe
execwait '"$pluginsdir\theapp.exe" "$exedir"'
setoutpath $temp
sectionend