title: Installing VC++ Redist 2008 in silent mode
body: <p>I want to install VC++ Redist 2008 in my NSIS setup script. I got the following piece of script to do it:</p>
  
  <pre><code>; Test if Visual Studio Redistributables 2005+ SP1 installed
  ; Returns -1 if there is no VC redistributables intstalled
  Function CheckVCRedist
     Push $R0
     ClearErrors
     ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7299052b-02a4-4627-81f2-1818da5d550d}" "Version"
  
     ; if VS 2005+ redist SP1 not installed, install it
     IfErrors 0 VSRedistInstalled
     StrCpy $R0 "-1"
  
  VSRedistInstalled:
     Exch $R0
  FunctionEnd
  </code></pre>
  
  <p>Basically its for VC++ Redist 2005, but i've edited the reg settings to check for presence of 2008(is it ok to do so?). I need the piece of script/command to install the VC++ Redist 2008.</p>
  
  <ul>
  <li>where do i store the VC setup and how to execute in silent mode.</li>
  <li>Is it ok to check at <code>.onInit</code>?</li>
  </ul>
  
  <p>Could someone please give a complete script which checks for presence and how to execute it in silent mode.</p>
  
  <p>Thanks,</p>