开发者

C++: How do I correctly register and unregister file type associations for our application (programatically)

开发者 https://www.devze.com 2022-12-30 18:32 出处:网络
Time was when you set file associations in: HEY_CLASSES_ROOT\\<.ext> However, that seems to be possible, but an incomplete solution anymore.There are additional associations throughout the regist

Time was when you set file associations in:

HEY_CLASSES_ROOT\<.ext>

However, that seems to be possible, but an incomplete solution anymore. There are additional associations throughout the registry. For example:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\KindMap HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Extensions

And all of the above, but by HKEY_USERS\

And Microsoft added their Set Default Associations control panel applet, which controls... what?

I'm looking for a white paper, or discussions on:

"How is a modern, Windows XP-Windows 7 compati开发者_StackOverflowble application written in C/C++ supposed to register and manipulate its file associations without interfering with Explorer, User-Settings, or the Default Associations cpl"

EDIT: I'm trying to further this investigation with more questions here: How to delete ProgIDs from other user accounts when uninstalling from Windows?


Alas, this documentation still seems current, and it's all about the registry: MSDN

Maybe someone's created a nice wrapper for this? Time to hit Google...


I believe Microsoft wants you to do this through an installation package rather than on-the-fly, since you need elevated permissions to do so.

Edit: See this previous StackOverflow question for how this might be possible.

How to change file association without UAC confirmation?

0

精彩评论

暂无评论...
验证码 换一张
取 消