ExtractTemporaryFile checks only filename and not path name
Actually ExtractTemporaryFile checks only the filename not the path. If you have multiple files with same name on different directories you need to rename files and add DestName parameters to the [files] entries if you need to use ExtractTemporaryFile . With a second parameter (sourcedir) it should possible distinguish different files.
4 comments
-
Gavin Lambert
commented
Setup may not know about source dirs, but it does know about DestDirs. It should be possible to extract files based on their DestDir as well as their DestName, or even extracting an entire DestDir. This would be useful to extract '{tmp}\SomePrereqInstaller', a folder containing a bunch of loose files required by an installer being called from PrepareToInstall, without having to individually name each file or repackage it into a single file (if that's even possible, given spanning limitations).
-
dave
commented
Here's a workaround:
[Files]
Source: "a.exe"; DestName:"b.exe"; Flags: dontcopyThen pass "b.exe" to ExtractTemporaryFile.
-
AdminDeanna Earley
(Admin, Inno Setup)
commented
Maybe an alternative is to give each entry an ID (optional) that can be used in ExtractTemporaryFileID()?
-
AdminMartijn Laan
(Admin, Inno Setup)
commented
Setup doesnt know about source dirs.