Archive: Install in temp


Install in temp
Hi,
I'm a n00b in NSIS.
But i#ve only a simple question: Is it possible to make an installer which extracts all files in a temp-folder (eg. C:\Windows\Temp) and runs the main *.exe. After the main exe quit the installer should uninstall everything. Is that possible? It's like a quick extract!
Thanks


$TEMP is what you're after (to get Temp folder path) and execute your file with ExecWait. ExecWait will execute your exe and wait until it is finished before continuing with installation. At that point, you can delete the files with Delete.

-Stu


What I do for a temporary install is to install everything to $TEMP and then write the uninstall key to run on startup in HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce and then remove it. That way if the user want to run the application again before reboot, they don't have to wait for everything to install again.


my code is:
------------------
Name "Silent"
OutFile "silent.exe"

SilentInstall silent

Function .onInit
FunctionEnd

Section
SetOutPath $TEMP
File gfx.exe
File silent.exe
ExecWait "$TEMP\gfx.exe"
Delete $TEMP\gfx.exe
Delete $TEMP\silent.exe
SectionEnd
------------------
The installer compiles, everything fine!
But if I launch it, it opens gfx.exe and after I close it, it only deletes silent.exe...
Why that?