Anyone know how to programatically associate a file extension with a app? I searched the web a bit but didn't find anything relevant...

I'd need tips to do that under Win, Linux and Mac...