I want to let the user select an association (open with) for an currently unregistered file extension.
Currently I’m telling the API to open the file by using ShellExecute and it returns an ERROR_NO_ASSOCIATION error code.
Is there a way to tell the API that it should let the user select a new association?
I use
Edit (inspired by David’s comment and https://stackoverflow.com/a/13229516/1431618):
One can omit
ShellExecuteandRunDll32by callingOpenAs_RunDLLdirectly:There is also SHOpenWithDialog on Windows Vista and later. (I find it interesting that Microsoft wrote a RunDLL compatible entry point but until Vista didn’t bother to provide a regular API function.)