title: Add a dll assembly to SQL Server using Advanced Installer
body: <p>I've developed a Windows application using C# and SQL Server 2008 R2. My application needs to use some database algorithms for some optimization and speed, so I created a <code>.dll</code> assembly. </p>
  
  <p>Consequently most of the stored procedures using this assembly for their T-SQL resulting. </p>
  
  <p>I know how to add this assembly to SQL Server like this:</p>
  
  <p>First step:</p>
  
  <pre><code>/* enable CLR in SQL Server */
  EXEC sp_configure 'clr enabled' , '1' 
  go 
  reconfigure;
  </code></pre>
  
  <p>Then second step:</p>
  
  <pre><code>/* Add ASSEMBLY to SQL Server */
  CREATE ASSEMBLY SQLFunction
  FROM 'FolderPath\...\SQLFunction.dll'
  </code></pre>
  
  <p>Now I want to publish my Windows app using Advanced Installer. The challenge is adding the second step to Advanced Installer SQL query because of the variable path of <code>'FolderPath\...\SQLFunction.dll'</code>.</p>
  
  <p>I can add the first step to Advanced Installer SQL query but how can I add that dll from <code>app directory</code> using SQL query or other ways.</p>
  
  <p>Please help and write your ideas here because I think this is a common challenge.</p>
  
  <p>Thanks a lot...</p>