What's the simplest way to associate my application with a file-extension that works for both Vista and previous versions of Windows ?
Does anyone have an example ?
What's the simplest way to associate my application with a file-extension that works for both Vista and previous versions of Windows ?
Does anyone have an example ?
This answer won't work for everyone - but if you are deploying a ClickOnce application (it's worth considering, at least) then you can set file-associations in Visual Studio for your app.
In the ClickOnce application Properties (this is for VS 2008):
I tried it with this 'beta' app DeepZoomViewer (ClickOnce published) - the file associations (in this case .DZI and .DZC) definitely work on both XP and Vista.
Even better, when you uninstall the ClickOnce app, the file associations it created are removed for you (again, my test app uses .DZI and .DZC). No registry hacking required.
EDIT: another link describing manually adding the file associations.