R – Winrar sfx deletes files too early

installationwinrar

I'm trying to build a sfx (self extracting archive) using winrar.

I'm using VS2008 to build a setup.exe and a myapp.msi. If setup.exe is executed it does some checking an launches myapp.msi

I'm using some sfx options to make the extraction quiet and make it extract so some temp folder:

;Der folgende Kommentar enthält SFX-Skriptbefehle

Setup=setup.exe
TempMode
Silent=2
Overwrite=1

It seems winrar deletes the msi right after setup.exe is launched. Setup.exe can't find the msi and crashes. Is there some way to fix this?

// Edit:

I solved the problem (a while ago) by just calling myapp.msi instead of setup.exe:

;Der folgende Kommentar enthält SFX-Skriptbefehle

Setup=myapp.msi
TempMode
Silent=2
Overwrite=1

The msi does not exit until the installation is finished.

Best Solution

7-zip provides tools specifically for creating SFX installers, give that a try :)

Related Question