title: Distributing the Visual C++ Runtime Libraries (MSVCRT)
body: <p>I have an ATL/WTL project developed using Visual Studio 2008 and up until now I have been statically linking with the CRT libraries, avoiding the need to ship them.  However, I now need to consider using the dynamic libraries (DLL) instead - in order to reduce the size of the code and because I want to use the excellent <a href="http://code.google.com/p/crashrpt/" rel="nofollow noreferrer">crashrpt</a> tool (which requires you dynamically link to the CRT.)</p>
  
  <p>Now, MS supply both a stand-alone installer (vcredist_x86.exe) and an MSM package but this is no good for me for two reasons:</p>
  
  <ul>
  <li>I am not using an MSI based installer (I am using InnoSetup).</li>
  <li>My application installs on a limited user account and the vcredist_x86.exe installer will not work.</li>
  </ul>
  
  <p>Therefore I want to ship the CRT DLLs and install then in my applications program folder.  Now, this is something you can do as I found the <a href="http://blogs.msdn.com/martynl/archive/2005/10/13/480880.aspx#488328" rel="nofollow noreferrer">following blog post</a> by Martyn Lovell, the MSVC Libraries Development Lead that says:</p>
  
  <blockquote>
    <p>However, if you want to
    install-applocal, you should make sure
    that your application has a manifest,
    and then copy the whole of this folder
    into your EXE directory: </p>
    
    <p>X:\Program Files\Microsoft Visual
    Studio
    8\VC\redist\x86\Microsoft.VC80.CRT </p>
    
    <p>and other folders if you use more than
    the CRT. Make sure you include the
    manifest.</p>
  </blockquote>
  
  <p>Just want I am after - except I don't understand this part:</p>
  
  <blockquote>
    <p>make sure that your application has a manifest</p>
  </blockquote>
  
  <p>My question is - how do I create an application manifest that references the CRT DLLs I want to use?  The only manifest information my projects currently use is the following (which ensures the app uses v6 of the Common Controls):</p>
  
  <pre><code>/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"
  </code></pre>
  
  <p>Can someone provide me with instructions on how to work the manifest magic using Visual Studio 2008?  There is a Microsoft.VC90.CRT.manifest file in my Visual Studio VC\redist\x86\Microsoft.VC90.CRT folder - do I need to use this somehow?</p>
  
  <p>Note: This is a similar - but different - question to <a href="https://stackoverflow.com/questions/1073509/should-i-redistribute-msvcrt-dll-with-my-application">this one</a>.</p>