title: Use INI file to determine destination path while installing the exe
body: <p>I have a requirement to install a setup (created via inno setup) in two different destination folders.</p>
  <p>My goal is to use a ini file to determine the destination directory while installing it.</p>
  <p>Setup.ini file</p>
  <pre><code>[Settings]
  #======================================================================
  DestDir=C:\\Software\\Path1
  #======================================================================
  </code></pre>
  <p>Inno Setup File</p>
  <pre><code>#define DestinationDir ReadIni(&quot;Setup.ini&quot;, &quot;Settings&quot;, &quot;DestDir&quot;, &quot;&quot;)
  
  [Files]
  Source: &quot;D:\Publish\MyService.exe&quot;;                 DestDir: &quot;{#DestDir}&quot;;    Flags: ignoreversion
  
  [Run]
  Filename: &quot;{#DestDir}\MyService.exe&quot;;        Parameters: &quot;-i -name MyService-display &quot;&quot;My Service&quot;&quot;&quot;;       StatusMsg: &quot;Installing my service&quot;;
  </code></pre>
  <p>I copy the installer file (setup.exe) to the server together with the .ini file (set to path1) and run the installer. I expect myService.exe file to be copied into Path1 (&quot;C:\Software\Path1&quot;).</p>
  <p><a href="https://i.stack.imgur.com/9yQ1l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9yQ1l.png" alt="enter image description here" /></a></p>
  <p>Then I will change the .ini file to following and re-run the installer. I expect myService.exe file to be copied into Path2 (&quot;C:\Software\Path2&quot;).</p>
  <pre><code>[Settings]
  #======================================================================
  DestDir=C:\\Software\\Path2
  #======================================================================
  </code></pre>
  <p>However, this is not working at all. Seems like the ini file can be referred only when we creating the setup installer via inno setup, not while executing the installer. Any suggestions how to achieve this?</p>