title: Inno Setup: copy file to multiple destinations defined by user
body: <p>During installation process user has ability to install number of some service instances (Service1- ServiceN). All the differences between these services - content of configuration files(actually there is only one executable in /Product_Root/run wich is called with different command-line params).Configuration files situated in ProductRoot/ServiceX/conf.</p>
  
  <p>Folders structure looks like :</p>
  
  <pre><code>/Product_Root
  ----/bin
  ----/doc
  ----/Service1
  ---------/conf
  ----/Service2
  ---------/conf
  ...
  ----/ServiceN
  ---------/conf
  </code></pre>
  
  <p>In ProductRoot/ServiceX/conf is situated, for example, service.properties file with these contents:</p>
  
  <pre><code>#...
  ServiceRoot = &lt;%ROOT_DIRECTORY%&gt;
  ListenPort = &lt;%PORT%&gt;
  #...
  </code></pre>
  
  <p>Also in /Product_Root/bin scripts for each service startup should be present:
  For example :</p>
  
  <pre><code>/Product_Root/bin/Service1.run.cmd
  /Product_Root/bin/Service2.run.cmd
  ...
  /Product_Root/bin/ServiceN.run.cmd
  ...
  </code></pre>
  
  <p>Script file structure is:</p>
  
  <pre><code>service.exe ../&lt;%SERVICE_NAME%&gt;/conf/service.properties
  </code></pre>
  
  <p>All values (like &lt;%SERVICE_NAME%>,&lt;%PORT%> etc.) are set by user during setup process for each Service.
  Amount of services is also set by user and may vary between 1 (by default) and 20-30.</p>
  
  <p>In case of single service - there is no problem.</p>
  
  <p>Files being copied, directories created using </p>
  
  <pre><code>[Files]
  Source: {#FilesPath}\bin\*.*; DestDir: {app}\{#FileLocationPrefix}\bin; Flags: ignoreversion restartreplace
  Source: {#АilesPath}\conf\*.*; DestDir: {app}\{#FileLocationPrefix}\{code:GetServiceName}\conf; Flags: ignoreversion recursesubdirs createallsubdirs restartreplace; 
  
  [Dirs]
  Name: {app}\{#FileLocationPrefix}{code:GetServiceName}\conf
  </code></pre>
  
  <p>After in ssPostInstall step  wildcards replace performed in copied files.</p>
  
  <p>Question.</p>
  
  <p>is it possible using Inno Setup + ISTool to do the same in case of number of services?</p>
  
  <p>E.g. something like that :</p>
  
  <pre><code>[Files]
  #for (i = 0; i &lt; ServiceCount(); ++i) 
  Source: {#АilesPath}\conf\*.*; DestDir: {app}\{#FileLocationPrefix}\{code:GetServiceName| i}\conf; Flags: ignoreversion recursesubdirs createallsubdirs
  </code></pre>
  
  <p>where i — is actually configuration number.
  I.e. is it possible to use information received from user during  installation process in [File], [Dirs] etc. sections for multiple copying of the same files in different directories?
  For copying single file in number of files with different names set by user during install process?</p>
  
  <p>Or I just going in the wrong direction?</p>