I am trying to figure out how to copy files to multiple locations with Inno Setup installer.
[Files]
Source: "myfolder\*" DestDir: {multipe dirs?}
Basically I have a function GetInstallDirs()
that looks for all the keys in a registry location and form an array for with the plugin install path and returns an array of directories. Instead of adding a line for each directory, is there a way DestDir
takes multiple directories?
So you wanted to use
DestDir: "{code:GetInstallDirs}"
?The
DestDir
can point to a single folder only.You have to create more entries in
[Files]
section, if you need to install the same file to multiple folders. Note that Inno Setup will compile the source file only once to the installer.I'm not aware of an easy way to create the multiple entries programmatically.
You could create "a lot" of entries likes:
You can create a large list of such entries using Inno Setup preprocessor.