Well, avi itself is just a container format, so the codecs used could several different ones. For things like FLV, I use Handbrake to convert to a more usable format and they play just fine. You might be able to convert your unplayable files with handbrake or vlc if vlc can play them to something recognized by media center, though converting a lot of videos can be a pain.
I don't know too much about codec packs, but there's something called CCCP that MIGHT help, but I'm not completely sure, 95% of my video files worked by default in Windows 7.