Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Using NSIS to create portable app? (http://forums.winamp.com/showthread.php?t=300249)

cyberdude 23rd November 2008 20:16

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

Anders 23rd November 2008 21:54

try something like:

outfile someportableapp.exe
page instfiles

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


All times are GMT. The time now is 06:30.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.