Is there a Windows API to modify file type associations for an extension?

Posted by JohnFx on Stack Overflow See other posts from Stack Overflow or by JohnFx
Published on 2009-09-18T21:18:10Z Indexed on 2010/03/20 20:21 UTC
Read the original article Hit count: 366

Filed under:
|
|
|

I'm looking for a way to programatically tweak the particulars of a file association on a Windows system. For example, the "Application User to Perform this Action" setting for the "Open" action for a particular file type.

Clearly I could do this by modifying the registry directly, but if there is an API I'd prefer to use that as it would likely be more resilient to changes in the OS handling of mapping extensions to applications.

For my purposes I'm needing to write this in VBScript (.VBS) file because it is part of a package to be used with VMWare ThinApp that mandates it. However, I'll port/wrap/whatever I need to make this week, so I am open to any solution (including using the .NET framework)

© Stack Overflow or respective owner

Related posts about .NET

Related posts about vbscript