iexpress hard-coded extraction destination folder?

Seth picture Seth · Mar 21, 2011 · Viewed 8.3k times · Source

I'm using iexpress to make a self extracting executable. Is there a way I can hard-code an extraction destination folder (preferably into a temp folder somehwere) so as to not have the extraction pop up the "Please type the location where you want to place the extraced file." dialog?

Answer

fission picture fission · Dec 4, 2012

There's no direct way to do this. (You can see my other answer for a longer explanation about it.)

The easiest solution is to make an IExpress archive that runs an "installation program", which is really just a batch file that copies the extracted files where they're needed.

In IExpress, you'd launch the batch file like: cmd /c persist.bat. And persist.bat looks something like:

@echo off
xcopy /y * "%temp%\persistent\"
del /f "%temp%\persistent\persist.bat"

(The last line is a nicety to hide the fact that you used this batch file to copy the extracted archive.)