title: Can I register to the GAC with Pascal scripting (InnoSetup)?
body: <p>I'm using InnoSetup to install an application I built. My client requests that it downloads the latest DLLs upon install using this InnoSetup addon:</p>
  
  <p><a href="http://www.sherlocksoftware.org/page.php?id=50" rel="nofollow">http://www.sherlocksoftware.org/page.php?id=50</a></p>
  
  <p>Simple enough. I got it working how I want to, but without the <strong>[Files]</strong> section (because its downloading them rather than building them into the script), I'm not sure how to register the downloaded DLLs to the GAC. With the <strong>[Files]</strong> section in, I was using the flag <em>gacinstall</em>.</p>
  
  <p>Now that I'm no longer using <strong>[Files]</strong>, I was wondering if there was a way to install the DLLs to the GAC via Pascal scripting? </p>
  
  <p>Here is the relevant part of my setup script:</p>
  
  <pre><code>[Code]
  procedure InitializeWizard();
  begin
   itd_init;
  
   itd_addfile('{#DownloadLocation}/mylibrary1.dll',expandconstant('{tmp}\mylibrary1.dll'));
   itd_addfile('{#DownloadLocation}/mylibrary2.dll',expandconstant('{tmp}\mylibrary1.dll'));
  
   itd_downloadafter(wpReady);
  end;
  
  procedure CurStepChanged(CurStep: TSetupStep);
  begin
   if CurStep=ssInstall then begin //Lets install those files that were downloaded for us     
    filecopy(expandconstant('{tmp}\mylibrary1.dll'),expandconstant('{app}\mylibrary1.dll'),false);
    filecopy(expandconstant('{tmp}\mylibrary2.dll'),expandconstant('{app}\mylibrary2.dll'),false);
   end;
  end;
  
  
  [Run]
  Filename: "{app}\{#MyAppExeName}"; Parameters: "-i"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, "&amp;", "&amp;&amp;")}}"; Flags: runhidden  
  Filename: "{app}\{#MyAppSvcName}"; Parameters: "-i"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, "&amp;", "&amp;&amp;")}}"; Flags: runhidden
  Filename: "{app}\{#MyAppExeName}"; Description: "Launch the ItraceIT configuration tool"; Flags: postinstall nowait skipifsilent
  
  [UninstallRun]
  Filename: "{app}\{#MyAppSvcName}"; Parameters: "-u"; Flags: runhidden
  Filename: "{app}\{#MyAppExeName}"; Parameters: "-u"; Flags: runhidden  
  </code></pre>
  
  <p>Thanks for your help.</p>