Specifying the location for Temp extraction

87 views
Skip to first unread message

Mark Beardsley

unread,
May 13, 2025, 9:11:19 AMMay 13
to innosetup
When running an INNO installer, it seems to inherently unpack the files to the C:\Temp directory.
Is there some way to specify another location?
We have customers whose machines are configured (for security reasons) to prohibit write access to the Temp directory.
This causes our installers to fail at installation time.
I know about the UseSetupLdr=no option, but this causes other problems for us.
Strangely, INNO does not seem to use the Windows TMP (or TEMP) environment variable, it seems to inherently use C:\Temp.
Is there a way to change the location (or even just make it use the environment variable)?

Jernej Simončič

unread,
May 13, 2025, 9:37:11 AMMay 13
to Mark Beardsley on [innosetup]

Inno Setup checks the environment variables in this order: TMP, TEMP, USERPROFILE, and if none of these point to a valid directory, it then uses Windows directory. If it's using C:\Temp at your customer, they have one of these variables set to C:\Temp.

 

-- 
< Jernej Simončič ><><><><>< https://eternallybored.org/ >


Eighty percent of all people consider themselves to be above-average drivers.
       -- Motor Vehicle Postulate

Gavin Lambert

unread,
May 13, 2025, 8:09:59 PMMay 13
to innosetup
On Wednesday, May 14, 2025 at 1:11:19 AM UTC+12 Mark Beardsley wrote:
We have customers whose machines are configured (for security reasons) to prohibit write access to the Temp directory.

If they're actually blocking write access to the Temp directory, then that is a misconfiguration or bug and they need to fix that.  A lot of software will malfunction if the temp directory is not writable.

What's more common in anti-malware tools is to block executing from the Temp directory, sometimes only if the execution requires elevation.  This is a more legitimate setting (since it can help prevent certain kinds of drive-by attacks) but it's still a bit misguided since the Downloads folder is a lot more vulnerable than the Temp folder (unless you're already compromised) and yet people will hate it if you block running installers from Downloads, so this is rarely done.  If you can't convince them that this setting is mostly pointless and disable it, then UseSetupLdr=no is the best workaround.
Reply all
Reply to author
Forward
0 new messages