Well, that depends on your operating system, of course. In XP, for instance, they're .dll's in the WINDOWS/SYSTEM32 folder. Unfortunately, they're not in one nice, neat place where you can just grab them and copy them. (On Windows 7, they're in WINDOWS/WINSXS and in WINDOWS/SERVICING/PACKAGES.)
It might be best to just install the K-Lite Codec Pack (the only codec pack I recommend) and then use the codec tool that comes with it to select which codecs you'd like to install.
Other codecs install as you add certain media players.
If you'd like to see which codecs you have, you can usually see them (at least on XP) by going to your Control Panel and opening Sounds and Audio Devices. On the Sounds and Audio Devices panel, click the Hardware tab, then select the Video Codecs and click the Properties button.
On Windows 7, open the Media Player and go to Help menu and select About Media Player. (If you don't see the Help menu, go to the Organize button and select Show Menu Bar.) On the About Media Player window, select Technical Support Information.
If you retained the downloaded installer files, that will be all that you need. Otherwise, if all you have are the installed .dll's, you are about to open a real can of worms, as you would need to Copy those to the exact locations in the System files, and then the real work would begin, and it would NOT be for the feint of heart, as one would have to completely hack the Registry to add the myriad entries to call those at boot-up. I doubt that you could find an MS engineer, who would undertake such a task.
When I buy, or download a CODEC, the installer program goes into my Download Files>CODEC's folder, and I back that up from time to time.
I also keep as clean a machine, as I can, so only install CODEC's on an as needed basis. I can just go to Lagarith, UT, or others' Web sites, and download their latest, when I go with a new OS. You might also want to look over your CODEC's, and especially for the ones that you no longer have the installer, and spend some time on the Internet, tracking them down. Just download the installers to a common folder, and write a CD-Data disc for those, so that you can just Copy them from the CD-Data, and run them to install on the new machine.
If you go with K-Lite (I am less a fan, than Steve ), I strongly recommend not installing the FFDShow module, as it has been death to many Adobe programs over the years. Once, that was installed, along with everything else, whether one wanted it, or not. I understand that now one has a lot of install options for K-Lite, but do not know for sure. I also recommend doing a complete system backup, pror to doing so, and then creating a manual System Restore Point, before that installation. Carefully check the CODEC's that you have installed up to that point, and after the installation, check those again, to see which ones have been overwritten. Adobe does a good job of hiding its CODEC's, so that they are not likely to be overwritten, however their priority can be changed in the Registry.
That cleared up for what for some time to me had been a mystery!
You are most welcome. Think of it as but a tiny down-payment for the assistance that you give others in this forum!
Good luck, and happy upgrading,