Archive: Exécute encapsulated file


Exécute encapsulated file
Hello,

My archive file (setup) contains other executable files (.NET framework for example).

Wehn launching the setup, I check if the framework is yet installed on the machine, and I'm launching the install if not.

So I want to access the .NET installer encapsulated in the archive, without having copied the files on the hard disk.

I'm trying like that:
ExecWait "$EXEFILE\dotnetfx\_dotNet.2.0.exe"
without success.


Am I right or must I do other things ?

Thanks a lot


Re: Exécute encapsulated file

Originally posted by sylvinhio

So I want to access the .NET installer encapsulated in the archive, without having copied the files on the hard disk.
Hi sylvinho,

AFAIK you can't execute from within the (normally packed) installer.

You will need to check if .NET is available/sufficient and if not, extract .NET installer to a temp dir and execute from there.

Something like:
:
:
Var TMPDIR
Var DotNetInstaller
:
:
!define DotNetInstaller32 "netfx20_en_x86.exe"
:
:


StrCpy $TMPDIR "$LOCALAPPDATA\TMP"
SetOutPath "$TMPDIR"


DetailPrint "Beginning installation of .NET Framework version."
FILE ${PROJECTDIR}\32\DOTNET20_EN\${DotNetInstaller32}
StrCpy $DotNetInstaller ${DotNetInstaller32}
DetailPrint "Pausing installation during installation of .NET Framework."

${If} ${Silent}
StrCpy $Cmd '"$TMPDIR\$DotNetInstaller" /q:a /c:"install /qn "'
${Else}
StrCpy $Cmd '"$TMPDIR\$DotNetInstaller" /q:a /c:"install /qb! "'
${EndIf}
ExecDos::exec /NOUNLOAD /ASYNC /DETAILED $Cmd "" ""