0x00 Preface
Note: This article is issued just to record my knowledge of the registry, which contains the wrong understanding, inaccurate understanding, and biased understanding. If any of your friends have ever played WIN32 's registration form, please feel free to advise. There are so few information about the registry these days. Maybe I have a limited IQ, I can't search!
This article guides:
This article does not involve the realization of the specific, the theory that everyone is suitable for reading. But ask the reader to at least know what the registry is, and how regedit opens it. What is a registry key .....
Getting Started with 0x01
Here I only study the function of the right-click menu.
In the registry, the mapping between the root system file suffix name and the handler is recorded under HKEY_CLASSES_ROOT, which is the file association. The most straightforward example is whether your MP3 file is opened by Cool dog music or netease cloud music. If we need to add a file association for our program, we need to manipulate and modify this registry key.
Of course, this registry key does not only handle file associations, there are other advanced actions: such as the File Explorer right-click menu item.
Here, let me briefly introduce you, HKEY_CLASSES_ROOT this directory has an absolutely existing subkey: \hkey_classes_root\*.
This registry key is mainly used to deal with the global suffix name, much more useless, we will direct to some combat. This is the registry key for the global suffix on my computer, note that the Shell registry subkey provides the simplest right-click operation, which means that no next-level menus are generally under the shell:
Did you see that I chose Vscode? I chose the BCD file because the file is not registered with the file association, so the shell registry key inside the global suffix determines how the right-click menu is displayed. Here we can see Open with code this menu item.
This time we delete the registry key to see the result:
That's when the right-click menu is gone. This example is an introduction, I think this example is a bit of a useful one.
0x02 more Content
Here I do not speak any programming practice, want to know how to operate the registry look here:
(C #) Https://docs.microsoft.com/zh-cn/dotnet/csharp/programming-guide/file-system/how-to-create-a-key-in-the-registry
Here only to discuss the file suffix name and URL protocol related things, note is the discussion, does not mean that I know more, if there is a more original introduction please harass me in the comment area.
(2017/11/24 to this day first, this article has been updated for a long time, and then write some more tomorrow)
Note Some of the following:
Openwithprogids: That is the open Mode menu display content, which is also open the list of items, to be sophisticated, after all, WIN32 things too far away .... Microsoft's documentation of the old do not know where to go, the new has been temporarily unable to find, in the Internet can be found are fragmented things, not a complete knowledge point ...
PersistentHandler: Permanent handle, is the Windows Search feature ... No translation complete, interested can see for yourself (address: Http://www.tomshardware.com/forum/20602-63-persistenthandler)
0x03 Some useful blogs
Http://www.cnblogs.com/cssmystyle/archive/2011/05/04/2036250.html
about Windows Registry-related Discoveries (C #)