title: How to programmatically create a file association that works in XP, Vista and Windows 7
body: <p>I want to be able to register my file-extension from my program.
  (Associate the filetype with my program)</p>
  
  <p>There are lots of articles about this, but the technique discussed (fiddling with the registry) is only appropriate for Windows XP as far as I see.</p>
  
  <p>What is the best way to associate a filetype with a program so that it works under XP, Vista and Windows 7 as well ?
  (Are there any working code-examples ?)</p>
  
  <p>ClickOnce would be an option, but this only registers the filetype at installation-time while I want to be able to register filetypes at runtime.</p>