If you need to redistribute components from Visual Studio 2008, such as the C runtime or the MFC DLLs, there are four ways to do it:
1. Put the DLLs in your installer and install them into Windows\System32 directory yourself.
DON'T EVEN THINK OF DOING THIS. It's almost impossible to do it right because of WinSxS. If you want complete control over your installation, use option #2.
2. Use the redistributable directories Microsoft provides.
These directories provide copies of the DLLs that are only available to your application.
Assuming you've installed Visual Studio 2008, you can find the directories at:
C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86
Important: If you do this with Visual Studio 2008 SP1, make sure you put the following in your precompiled header:
#define _BIND_TO_CURRENT_VCLIBS_VERSION 1
Advantage: Doesn't require admin privileges. Works with XCOPY. Your app won't break if the system global version is updated by Microsoft (but you won't benefit from security fixes either.)
Disadvantage: Not viable if your EXEs and DLLs are installed across multiple directories.
3. Microsoft Visual C++ 2008 Redistributable Package:
SP1 distribution. See caveats.
[Update 6/22/2009] Both of these distributions cause the the Windows 7 Logo Toolkit Beta to generate FAIL errors.
Advantage: All you have to do is run it. Permamently installs the components in the proper locations.
Disadvantage: Includes everything, so it's larger than the individual merge modules. If you are building your own installer, not as clean of a user experience as the merge modules.
4. Use the Merge Modules.
Assuming you've installed Visual Studio 2008, you can find the files at:
C:\Program Files\Common Files\Merge Modules
Advantage: Best user experience. Smallest download.
Disadvantage: Installation isn't permanent - the DLLs may be uninstalled when your application is uninstalled. Requires you to use Windows Installer. (This is only a disadvantage for a minority of developers. Windows Installer is a logo requirement for Vista.)