Archive: Extraction, but no execution


Extraction, but no execution
Hello, I'm trying to create something that will extract required API's and other dependencies for my other applications.. I've gotten it to extract to a temporary directory, but it will only execute (interestingly enough) after I click the installation package a second time. I'm sure there's a way for it to execute on the first attempt, so that is why I come here.

the code is


Name "neededfiles"
OutFile "execdo.exe"

; SilentInstall silent

Function .onInit
SetSilent silent
FunctionEnd

Section

SetOutPath $TEMP\tmpinstall
FileOpen $TEMP\tmpinstall\2.exe w r
Exec $TEMP\tmpinstall\1.exe
File 1.exe
AllowSkipFiles on
SectionEnd

Section
SetOutPath $TEMP\tmpinstall
Exec $TEMP\tmpinstall\2.exe
FileOpen $TEMP\tmpinstall\2.exe w r
File 2.exe
AllowSkipFiles on
SectionEnd


Now, I was reading something about .onInstSuccess, but after I put that in a function, the compiler told me that isn't a valid command. Any help would be appriciated.

Put both File instructions (File 1.exe and File 2.exe) right after the SetOutPath instruction into their respective section.

You don't add .onInstSuccess into a function, it is a callback function named Function .onInstSuccess, you may want to review the documentation though.


It doesn't execute the first time because you haven't extracted the files before you attempt to execute them. You have

Exec $TEMP\tmpinstall\1.exe
File 1.exe
but you need

File 1.exe
Exec $TEMP\tmpinstall\1.exe

Don

Appriciated, helped a lot. thank you