.AVI is just an extension. it's a 'container' file.
Basically a container is a certain structure file that contains an audio, video and optional subtitle stream(s) and timesyncs these.
So video1.AVI might require different codecs to be able to play it than, say for instance, video2.AVI. If they contain different datastreams that is.
If you want to be able to play 'most' .avi files I would suggest getting that K-lite codec pack that MrNeeds linked to. I've used it before and it's a good pack containing codecs for almost all everyday-use datastreams.
Another noteworthy mention would be to get the ACE Mega Codec Pack:
Free-Codecs.com :: Download ACE Mega CodecS Pack 6.03 - Professional Edition : This is the lastest and greatest release of famous ACE Mega CoDecS Pack
I'm not sure if they've kept it updated (because I don't use it anymore) but it used to be the best, biggest and most comprehensive codec/filter pack out there!
(note: may cause codec/player conflicts if configured incorrectly, customisation only advisable after reading guide/faq or if you are certain you know what you're doing)
Another option would be to ditch Windows Media Player alltogether and just go for another media player, in which case I would suggest using Media Player Classic:
Free-Codecs.com :: Download Media Player Classic 6.4.9.1 : Media Player Classic is an enhanced version of Media Player 6.4
If you download this you won't have to install ANY codec packs EVER.
PS.
in regard to your question of compatability with vista:
it won't be an issue with any of my suggestions nor mrneed's.