问题
I've been looking for a proper way to get file associations working on WinXP and above. The association should be replaced if it already exists. The application I've developed always run in admin mode, so rights shouldn't be a problem.'
I've come across some old posts that had some sample code, but some of them didn't work well enough and some not at all. I'm using this post to make a final desicion on the method I will attempt to use and am looking for as much feedback as possible.
回答1:
I think you need to make changes to the registry as shown here http://msdn.microsoft.com/en-us/library/cc144154%28v=vs.85%29.aspx#registration
来源:https://stackoverflow.com/questions/4625297/c-sharp-proper-way-for-file-associations