title: Inno Setup: Run regsvr32 with a specific working directory
body: <p>I'm trying to register a number of DLL's as part of my installer.  I'm using the <code>regserver</code> flag, and it works perfectly for most of the DLL's.  However, one DLL fails to register.  It tries to load other DLL's and fails if it can't find them in the current directory.  It registers cleanly if regsvr32 is run manually from the {app} directory.</p>
  <p>Is there any way to set the working directory for the regserver flag? Or the whole installer?</p>
  <p>For now, I'm working round it via a <code>[Run]</code> entry:</p>
  <pre><code>[Run]
  ;Register components that are &quot;special&quot;
  Filename: &quot;{sys}\Regsvr32.exe&quot;; Parameters: &quot;/s Awkward.dll&quot;; \
      WorkingDir: &quot;{app}&quot;; StatusMsg: &quot;Registering components ... &quot;; \
      Flags: runhidden; 
  </code></pre>
  <p>But this is not ideal, as I suspect I also ought to add an <code>[UninstallRun]</code> section and add an unregister command.  I'd hoped I could do:</p>
  <pre><code>[Files]
  Source: &quot;{#mysrc}\Awkward.dll&quot;; DestDir: &quot;{app}&quot;; Flags: regserver;  \
      WorkingDir: &quot;{app}&quot;
  </code></pre>
  <p>Is there an easier way to register/unregister from a specific directory?</p>