Superfreak3
Occasional contributor

Setup.exe Copying to Temp Directory on Launch... ?s

Hi all,

In all the years of doing this I never really noticed this before.  When a setup.exe is launched, it is first copied to the users Temp directory before extracting.  I always thought 'stuff' was just extracted from the .exe (Prerequisites and such) to the temp directory from the launching location.

We have a setup.exe that has another setup.exe of ours as a prerequisite.  Let's say the Main install file is 10MB and the Prerequisite installation is 5MB.   Main launched and copied to Temp directory (20 MB of disk space).  This extracts the prerequisite .exe (25 MB of disk space in total to this point).  The prerequisite is launched and that is then copied to another GUID named folder (30 MB).  The .msi is then extracted from the prerequisite .exe for another 5ish MB.  So, before the .msi of the prerequisite actually launches, 35 MB of disk space are eaten.

I would think it would be more efficient to extract things from the .exe in the launching area to the temp folder than copying the whole .exe first.  We'd be talking about roughly 20MB as opposed to the 35MB we now see.

The sizes mentioned are just for example.  We are dealing with 2 and 3 GB packages and it quickly adds up.

Am I missing a Setup.exe release setting which might change or improve upon the current behavior?

I've tried to pull another Microsoft install .exe of some sort to see if the behavior is the same, but I don't see it.

Is the Cache setting in release at play here.  We currently have it set to cache the install, but the cache location set is not the Temp folder.

Labels (1)
0 Kudos
4 Replies
Revenera_Ian
Revenera
Revenera

Re: Setup.exe Copying to Temp Directory on Launch... ?s

Hi @Superfreak3,

Thank you for your post.

My understanding is that this is intended behavior that the setup.exe / installer copies itself to the temp location then runs from the temp location. This is to prevent DLL preloading and binary planting.

More information can be found in the documentation at this link:

https://community.flexera.com/t5/InstallShield-Knowledge-Base/Windows-loads-a-different-library-or-l...

Please review that documentation. Does that address this issue for you?

Please let me know if you have any questions or concerns. Thank you for your patience and cooperation.

0 Kudos
Superfreak3
Occasional contributor

Re: Setup.exe Copying to Temp Directory on Launch... ?s

Thank you for the quick reply.  I do have a few additional questions.

Do these issues apply to launchers specifically named Setup.exe.  We do not use that naming with our launchers.

Since there are no hotfixes listed for more recent versions of InstallShield, can I assume any fixes have been addressed in more recent releases such as 2018 SP1 and 2020?

So basically, there is no workaround.  Setup launchers will first be copied to the installing user's Temp directory, correct?

0 Kudos
Superfreak3
Occasional contributor

Re: Setup.exe Copying to Temp Directory on Launch... ?s

I'm not sure what the linked information has to do with launching a MyApplicationPackage.exe from let's say C:\MyDir.  

Is the behavior of then taking MyApplicationPackage.exe and copying to the Temp folder just a workaround of all the issues mentioned in the linked info?

0 Kudos
Revenera_Ian
Revenera
Revenera

Re: Setup.exe Copying to Temp Directory on Launch... ?s

Thank you for your reply, @Superfreak3.

To clarify, the possible issues are DLL preloading and binary planting.

The behavior of the setup.exe copying itself to the temp location then running from there is intended behavior meant to address the possible issues of DLL preloading and binary planting.

There is no workaround, since this is the intended behavior by design.

Please let us know if you have any questions or concerns. Thank you for your patience and cooperation.

0 Kudos